DOM Objects Flashcards

1
Q

accessKey

A

Sets or returns the accesskey attribute of an element

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

appendChild()

A

Adds a new child node to an element

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

attributes

A

Returns a NamedNodeMap of an element’s attributes

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

blur()

A

Removes focus from an element

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

childElementCount

A

Returns a node list of all the elements child elements

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

childNodes

A

Returns a node list of an element’s child nodes

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

children

A

Returns an HTMLCollection of an elements child elements

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

classList

A

Returns the class name(s) of an element

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

className

A

Sets or returns the value of the class attribute of an element

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

click()

A

Simulates a mouse-click on an element

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

clientHeight

A

Returns the height of an element, including padding

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

clientLeft

A

Returns the width of the left border of an element

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

clientTop

A

Returns the width of the top border of an element

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

clientWidth

A

Returns the width of an element, including the padding

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

cloneNode()

A

Clones an element

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

closest()

A

Search the DOM tree for the closest element that matches a CSS selector

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

compareDocumentPosition()

A

Compares the document position of two elements

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

contains()

A

Returns true if a node is a descendent of a node

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

contentEditable

A

Sets or returns whether the content of an element is editable or not

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

dir

A

Sets or returns the value of the dir attribute of an element

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

exitFullScreen()

A

Cancels an element in full screen mode

22
Q

firstChild

A

Returns the first child node of an element

23
Q

focus()

A

Gives focus to an element

24
Q

getAttribute()

A

Returns the value of an element’s attribute

25
getBoundingClientRect()
Returns the size of an element and its position relative to the viewpoint
26
getElementsByClassName()
Returns a collection of child elements with a given class name
27
getElementsByTagName()
Returns a collection of child elements with a given tag name
28
hasAttribute()
Returns true if an element has a given attribute
29
hasAttributes()
Returns true if an element has any attributes
30
hasChildNodes
Returns true if an element has any child nodes
31
id
Sets or returns the value of the id attribute of an element
32
innerHTML
Sets or returns the content of an element
33
innerText
Sets or returns the text content of a node and its decendants
34
insertAdjacentElement()
Inserts a new HTML formatted text at a position relative to an element
35
insertAdjacentHTML()
Insert an HTML formatted text at a position relative to an element
36
insertAdjacentText()
Inserts text into a position relative to an element
37
insertBefore()
Inserts a new child node before an existing child node
38
isContentEditable
Returns true if an element's content is editable
39
isDefaultNamespace()
Returns true if a given namespaceURI is the default
40
isEqualNode()
Checks if two elements are equal
41
isSameNode()
Checks if two elements are the same node
42
isSupported()
Returns true if a feature is supported on the element
43
lang
Sets or returns the value of the lang attribute of an element
44
lastChild
Returns the last child node of an element
45
lastElementChild
Returns the last child node of an element
46
matches()
Returns true if an element is matched by a given CSS selector
47
namespaceURI
Returns the namespace URI of an element
48
nextSibling
Returns the next node at the same node tree level
49
nextElementSibling
Returns the next element at the same node tree level
50
nodeName
Returns the name of a node