Chapter 5 Flashcards
T/F The top-level object in the browser object model is the Window object, which represents a web browser window
True
T/F The objects in the BOM for any given web page depend on the contents of the page
False
T/F The getElementsBySelector() method returns a collection of elements matching a specified selector
True
T/F Internet Explorer 8 does not support the textContent property
True
T/F A node attached with the appendChild() method is always added as the last child element of the parent element
True
When you open a new web browser window, you can customize its appearance using the BLANK argument of the window.open() method
options
In order to make a window the active window, you use the BLANK method of the Window object
focus()
The BLANK method is used in JavaScript to execute code after a specific amount of time has elapsed
setTimeout()
The BLANK method is used to cancel a setTimeout() method before its code executes
clearTimeout()
The BLANK method repeatedly executes the same code after being called only once
setInterval()
The BLANK method is used to clear a setInterval() method call
clearInterval()
The History object contains a single property, the BLANK property, which contains the specific number of documents that have been opened during the current browser session
length
The BLANK object allows you to change to a new web page from within JavaScript code
Location
The BLANK object is used to obtain information about the current web browser
Navigator
T/F getElementById() returns a node list or HTML collection
False
BLANK returns all h1 elements in a document
getElementsByTagName(“h1”)
BLANK returns all elements in a document that match a selector p figure img
querySelectorAll(“p figure img”)
BLANK references the CSS font-family property in JavaScript when using dot notation
fontFamily
BLANK is the correct way to reference the href attribute of the element with the id value homeLink
document.getElementById(“homeLink”).href
BLANK results in a node that exists independently of the DOM tree?
createElement()
The DOM hierarchy is also known as BLANK
the DOM tree
BLANK returns the element created by the HTML tag pair <p class="first"></p>
getElementsByClassName(“first”)
BLANK method adds a node to a parent node before one or more existing child nodes
insertNode()
BLANK method returns a single element?
querySelector()