Chapter 5 Flashcards

1
Q

T/F The top-level object in the browser object model is the Window object, which represents a web browser window

A

True

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

T/F The objects in the BOM for any given web page depend on the contents of the page

A

False

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

T/F The getElementsBySelector() method returns a collection of elements matching a specified selector

A

True

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

T/F Internet Explorer 8 does not support the textContent property

A

True

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

T/F A node attached with the appendChild() method is always added as the last child element of the parent element

A

True

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

When you open a new web browser window, you can customize its appearance using the BLANK argument of the window.open() method

A

options

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

In order to make a window the active window, you use the BLANK method of the Window object

A

focus()

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

The BLANK method is used in JavaScript to execute code after a specific amount of time has elapsed

A

setTimeout()

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

The BLANK method is used to cancel a setTimeout() method before its code executes

A

clearTimeout()

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

The BLANK method repeatedly executes the same code after being called only once

A

setInterval()

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

The BLANK method is used to clear a setInterval() method call

A

clearInterval()

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

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

A

length

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

The BLANK object allows you to change to a new web page from within JavaScript code

A

Location

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

The BLANK object is used to obtain information about the current web browser

A

Navigator

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

T/F getElementById() returns a node list or HTML collection

A

False

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

BLANK returns all h1 elements in a document

A

getElementsByTagName(“h1”)

17
Q

BLANK returns all elements in a document that match a selector p figure img

A

querySelectorAll(“p figure img”)

18
Q

BLANK references the CSS font-family property in JavaScript when using dot notation

A

fontFamily

19
Q

BLANK is the correct way to reference the href attribute of the element with the id value homeLink

A

document.getElementById(“homeLink”).href

20
Q

BLANK results in a node that exists independently of the DOM tree?

A

createElement()

21
Q

The DOM hierarchy is also known as BLANK

A

the DOM tree

22
Q

BLANK returns the element created by the HTML tag pair <p class="first"></p>

A

getElementsByClassName(“first”)

23
Q

BLANK method adds a node to a parent node before one or more existing child nodes

A

insertNode()

24
Q

BLANK method returns a single element?

A

querySelector()

25
A set of connected nodes that are not part of a document is known as a(n) BLANK
document fragment
26
The BLANK object represents a web browser window
Window
27
The Document object branch of the BOM is represented by its own object model called the BLANK
Document Object Model DOM
28
One way of referring to the Window object is by using the BLANK property, which refers to the current Window object
self
29
For security reasons, you should use the BLANK property when possible instead of the innerHTML property
textContent
30
Each item in the DOM tree is known as a(n) BLANK
node