FlashKeepers

Web Development · College · College and University

Browser APIs and the DOM

DOM traversal and manipulation, events and bubbling, fetch, Web Storage, IntersectionObserver, service workers and the History API.

About this set

43 basic cards for College Web Development. It opens with "What does querySelector() return?" and "What is the difference between querySelector and querySelectorAll?". Study it alongside the other College sets below.

43 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What does querySelector() return?
Show answerThe first element matching the CSS selector, or null if no match exists.
What is the difference between querySelector and querySelectorAll?
Show answerquerySelector returns one element, querySelectorAll returns a NodeList of all matching elements.
What does parentElement return?
Show answerThe parent node that is an Element, skipping any text or comment nodes.
What is the difference between children and childNodes?
Show answerchildren returns only Element nodes, childNodes returns all node types including text and comment nodes.
What is the difference between nextSibling and nextElementSibling?
Show answernextSibling returns the next node of any type, nextElementSibling returns only the next Element node.
What does the closest() method do?
Show answerSearches the element and its ancestors for the first element matching a CSS selector.
What does textContent return?
Show answerThe text content of an element and all its descendants, excluding any HTML markup.
What is the difference between textContent and innerText?
Show answerinnerText considers CSS visibility and returns only visible text, textContent ignores visibility.
What does innerHTML do?
Show answerSets or gets the HTML markup content of an element, including tags.
What does appendChild do?
Show answerAdds a node as the last child of a parent element.
What does removeChild do?
Show answerRemoves a specified child node from the DOM.
What does insertBefore do?
Show answerInserts a node before a specified child node as a sibling.
What does replaceChild do?
Show answerReplaces an existing child node with a new node.
What does cloneNode do?
Show answerCreates a copy of a node, with an optional boolean to include all child nodes.
What does setAttribute do?
Show answerSets the value of an attribute on an element.

28 more cards in the app

Study this set free