HTML DOM Flashcards
activeElement
Returns the currently focused element in the document
addEventListener()
Attaches an event handler to the element/document
adoptNode
Adopts a node from another document
baseURI
Returns base URI of the document
body
Sets or returns the documents body ()
characterSet
Returns the character encoding for a document (ex: UTF-8)
close()
Closes the output stream previously opened with document.open()
cookie
Returns all name/value pairs of cookies in the document
createAttributes()
Creates an attribute and returns the attribute as an Attr object
createComment()
Creates a comment and returns the comment node, comments are invisible
createDocumentFragment()
Creates an empty DocumentFragment node
createElement()
Creates an Element node
createEvent()
Creates new event
createTextNode()
Creates a Text node
defaultView
Returns the window object associated with a document, or null if none is available
designMode
Controls whether the entire document should be editable or not
doctype
Returns the Document Type Declaration associated with the document
documentElement
Returns the root element of the document (HTML)
documentURI
Sets or returns the location of a document (URN & URL)
domain
Returns the domain name of the server that loaded the document
embeds
Returns a collection of all embed elements
forms
Returns a collection of all form elements
getElementByID()
Returns the element with the given ID
getElementByClassName()
Returns HTML elements with the given class name