Using JavaScript

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/42

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

43 Terms

1
New cards

platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents.

DOM

2
New cards

In the DOM, each element within the HTML document is called

node

3
New cards

represents a collection of nodes

nodelist

4
New cards

is the root JavaScript object representing the entire HTML document

DOM document object

5
New cards

A NodeList of child nodes for this node

childNodes

6
New cards

First child node of this node

firstChild

7
New cards

Last child of this node

lastChild

8
New cards

Next sibling node for this node

nextSibling

9
New cards

Name of the node

nodeName

10
New cards

Type of the node

nodeType

11
New cards

Value of the node

nodeValue

12
New cards

Parent node for this node

parentNode

13
New cards

Previous sibling node for this node

previousSibling

14
New cards

Represents the text content (stripped of any tags) of the node

textContent

15
New cards

Returns the single element node whose id attribute matches the passed id.

getElementById("id")

16
New cards

Returns a NodeList of elements whose class name matches the passed name

getElementsByClassName("name")

17
New cards

Returns a NodeList of elements whose tag name matches the passed name.

getElementsByTagName("name")

18
New cards

Returns the first element node that matches the passed CSS selector.

querySelector("selector")

19
New cards

Returns a NodeList of elements that match the passed CSS selector.

querySelectorAll("selector")

20
New cards

A read-only list of CSS classes assigned to this element. This list has a variety of helper methods for manipulating this list.

classList

21
New cards

The current value for the class attribute of this HTML element.

className

22
New cards

The current value for the id of this element.

id

23
New cards

Represents all the content (text and tags) of the element.

innerHTML

24
New cards

The style attribute of an element. This returns a CSSStyleDeclaration object that contains sub-properties that correspond to the various CSS properties.

style

25
New cards

The tag name for the element.

tagName

26
New cards

Adds a new child node to the end of the current node.

appendChild

27
New cards

Creates a new attribute node.

createAttribute

28
New cards

Creates an HTML element node

createElement

29
New cards

Creates a text node.

createTextNode

30
New cards

Inserts a new child node at one of four positions relative to the current node.

insertAdjacentElement

31
New cards

Inserts a new text node at one of four positions relative to the current node.

insertAdjacentText

32
New cards

Inserts a new child node before a reference node in the current node.

insertBefore

33
New cards

Removes a child from the current node.

removeChild

34
New cards

Replaces a child node with a different child.

replaceChild

35
New cards

Fires when the entire page is loaded.

window.load

36
New cards

This includes images and stylesheets, so on a slow connection or a page with a lot of images, the load event can take a long time to fire.

window.load

37
New cards

Fires when the HTML document has been completely downloaded and parsed.

document.DOMContentLoaded

38
New cards

is when an event fires on an element that has ancestor elements, the event propagates to those ancestors.

Event Propagation

39
New cards

the browser checks the outermost ancestor (the <html> element) to see if that element has an event handler registered for the triggered event, and if so, it is executed.

event capturing phase

40
New cards

this continues until it reaches the element that triggered the event

event target

41
New cards

the opposite occurs. The browser checks if the element that triggered the event has an event handler registered for that event, and

if so, it is executed. It then proceeds outwards until it reaches the outermost ancestor

event bubbling phase

42
New cards

is a technique commonly used to avoid assigning numerous duplicate event listeners to a list of child events.

Event Delegation

43
New cards

provides read/write access to custom data attributes (data-*) set on the element.

dataset property