javascript-dom-traversal Flashcards
1
Q
What is the difference between the parentNode and parentElement properties?
A
The parentElement property returns the “element” parent, while parentNode returns “any node” parent
2
Q
Why is it important to be able to traverse the DOM?
A
White space,
Dom traversal is useful helping target properties within element w/ JS.
3
Q
What kind of information is useful to store in custom attributes?
A
Description of said attributes.
most useful would be data-
type of attribute.