Document Methods Flashcards
adoptNode(node)
Adopts a node from another document to this document, and returns the adopted node
createAttribute()
Creates an attribute node
createComment()
Creates a Comment node with the specified text
createDocumentFragment()
Creates an empty DocumentFragment node
createElement()
Creates an Element node
createTextNode()
Creates a Text node
getElementById()
Returns the element that has the ID attribute with the specified value
getElementsByClassName()
Returns an array-like object of all child elements which have all of the given class names
getElementsByTagName()
Returns a NodeList containing all elements with the specified tagname
importNode()
Imports a node from another document
querySelector()
Returns the first element matching the specified CSS selector
querySelectorAll()
Returns a NodeList containing all elements that match the specified CSS selector