Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// GOOD! DOM OOP!
const myElement = document.querySelector('my-element');
myElement.yell();
// BAD IDEA!
const yey = document.querySelector('my-element')
.shadowRoot
.querySelector('div')
.innerText;
alert(yey);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment