They call me DOM Module #32 Flashcards

1
Q

What are the two main objects developers interact with the most when working with the DOM API?

A

document.object and window.object

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

What are the most common properties exposed by the window object?

A
  1. console
  2. document
  3. history
  4. location
  5. localStorage
  6. sessionStorage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which methods can be used on the window object ?

A
  1. alert( )
  2. postMessage( )
  3. requestAnimationFrame( )
  4. setInterval( )
  5. setTimeout( )
  6. setImmediate( )
  7. addEventListener( )
  8. removeEventListener( )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The main way to “hook” into DOM elements is by using these selectors:

A

document. getElementByID( )
document. getElementsByTagName( )
document. getElementsByClassName( )
document. querySelector( )
docuement. querySelectorAll( )

Examples:

document. querySelector('#test')
document. querySelectorAll('.my-class')
document. querySelector('#test .my-class')
document. querySelector('a:hover')
How well did you know this?
1
Not at all
2
3
4
5
Perfectly