Created
June 27, 2017 20:42
-
-
Save jmlavoier/e9024616890df22f1daca232a979d811 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
let p = document.querySelector('.content > p'); | |
console.log(document.parentNode); // <div id="cont" class="content">...</div> | |
console.log(document.parentElement); // <div id="cont" class="content">...</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Acredito que tu esteja pegando os atributos do elemento errado 😄