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
2
Q
What are the most common properties exposed by the window object?
A
- console
- document
- history
- location
- localStorage
- sessionStorage
3
Q
Which methods can be used on the window object ?
A
- alert( )
- postMessage( )
- requestAnimationFrame( )
- setInterval( )
- setTimeout( )
- setImmediate( )
- addEventListener( )
- removeEventListener( )
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')