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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly