Created
May 27, 2018 18:14
-
-
Save kyuwoo-choi/6deebe637c0196eb6496f06ccdb1f138 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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