Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!-- GOOD! DOM OOP! -->
<my-element lang="ko"></my-element>
<script>
// BAD IDEA!
document.querySelector('my-element')
.shadowRoot
.querySelector('div')
.innerText = 'Yey!'
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment