🏠 New in High Baseline Support: DOM
January 29, 2018
The DOM (Document Object Model) API represents HTML and XML documents as trees of nodes. You can use the API to inspect and modify the structure and content of a document.
Source features
api.Attr[mdn]api.Attr.localName[mdn]api.Attr.name[mdn]api.Attr.namespaceURI[mdn]api.Attr.ownerElement[mdn]api.Attr.prefix[mdn]api.Attr.value[mdn]api.CharacterData[mdn]api.CharacterData.appendData[mdn]api.CharacterData.data[mdn]api.CharacterData.deleteData[mdn]api.CharacterData.insertData[mdn]api.CharacterData.length[mdn]api.CharacterData.replaceData[mdn]api.CharacterData.substringData[mdn]api.DOMImplementation[mdn]api.DOMImplementation.createDocument[mdn]api.DOMImplementation.createDocumentType[mdn]api.Document[mdn]api.Document.URL[mdn]api.Document.createAttribute[mdn]api.Document.createAttributeNS[mdn]api.Document.createCDATASection[mdn]api.Document.createComment[mdn]api.Document.createDocumentFragment[mdn]api.Document.createElement[mdn]api.Document.createElementNS[mdn]api.Document.createProcessingInstruction[mdn]api.Document.createTextNode[mdn]api.Document.defaultView[mdn]api.Document.doctype[mdn]api.Document.documentElement[mdn]api.Document.forms[mdn]api.Document.getElementById[mdn]api.Document.getElementsByName[mdn]api.Document.getElementsByTagName[mdn]api.Document.getElementsByTagNameNS[mdn]api.Document.images[mdn]api.Document.implementation[mdn]api.Document.importNode[mdn]api.Document.lastModified[mdn]api.Document.links[mdn]api.Document.referrer[mdn]api.Document.title[mdn]api.Element[mdn]api.Element.attributes[mdn]api.Element.getAttribute[mdn]api.Element.getAttributeNS[mdn]api.Element.getAttributeNode[mdn]api.Element.getAttributeNodeNS[mdn]api.Element.getElementsByTagName[mdn]api.Element.getElementsByTagName.all_elements_selector[mdn]api.Element.getElementsByTagNameNS[mdn]api.Element.getElementsByTagNameNS.all_elements_selector[mdn]api.Element.hasAttribute[mdn]api.Element.hasAttributeNS[mdn]api.Element.hasAttributes[mdn]api.Element.innerHTML[mdn]api.Element.localName[mdn]api.Element.namespaceURI[mdn]api.Element.prefix[mdn]api.Element.removeAttribute[mdn]api.Element.removeAttributeNS[mdn]api.Element.removeAttributeNode[mdn]api.Element.setAttribute[mdn]api.Element.setAttributeNS[mdn]api.Element.setAttributeNode[mdn]api.Element.setAttributeNodeNS[mdn]api.Element.tagName[mdn]api.HTMLCollection[mdn]api.HTMLCollection.item[mdn]api.HTMLCollection.length[mdn]api.HTMLCollection.namedItem[mdn]api.HTMLDocument[mdn]api.HTMLElement[mdn]api.Node[mdn]api.Node.firstChild[mdn]api.Node.hasChildNodes[mdn]api.Node.nodeName[mdn]api.Node.nodeValue[mdn]api.Node.normalize[mdn]api.Node.ownerDocument[mdn]api.Node.previousSibling[mdn]api.NodeList[mdn]api.NodeList.item[mdn]api.NodeList.length[mdn]api.ProcessingInstruction[mdn]api.ProcessingInstruction.target[mdn]api.Text[mdn]api.Text.splitText[mdn]api.Node.appendChild[mdn]api.Node.cloneNode[mdn]api.Node.insertBefore[mdn]api.Node.nextSibling[mdn]api.Node.nodeType[mdn]api.Node.parentNode[mdn]api.Node.removeChild[mdn]api.Node.replaceChild[mdn]api.Node.childNodes[mdn]api.CDATASection[mdn]api.Comment[mdn]api.Document.adoptNode[mdn]api.Document.characterSet[mdn]api.Document.createNodeIterator[mdn]api.DocumentFragment[mdn]api.DocumentType[mdn]api.DocumentType.name[mdn]api.DocumentType.publicId[mdn]api.DocumentType.systemId[mdn]api.HTMLElement.dir[mdn]api.Node.isDefaultNamespace[mdn]api.Node.isEqualNode[mdn]api.Node.lookupNamespaceURI[mdn]api.Node.lookupPrefix[mdn]api.Node.textContent[mdn]api.Document.createTreeWalker[mdn]api.Document.DOMContentLoaded_event[mdn]api.Document.compatMode[mdn]api.DOMStringList[mdn]api.DOMStringList.item[mdn]api.DOMStringList.length[mdn]api.Node.baseURI[mdn]api.DOMStringList.contains[mdn]api.Document.getElementsByClassName[mdn]api.NodeIterator[mdn]api.NodeIterator.filter[mdn]api.NodeIterator.nextNode[mdn]api.NodeIterator.previousNode[mdn]api.NodeIterator.root[mdn]api.NodeIterator.whatToShow[mdn]api.Document.querySelector[mdn]api.Document.querySelectorAll[mdn]api.Element.querySelector[mdn]api.Element.querySelectorAll[mdn]api.Element.children[mdn]api.Document.readyState[mdn]api.DOMImplementation.createHTMLDocument[mdn]api.TreeWalker[mdn]api.TreeWalker.currentNode[mdn]api.TreeWalker.filter[mdn]api.TreeWalker.firstChild[mdn]api.TreeWalker.lastChild[mdn]api.TreeWalker.nextNode[mdn]api.TreeWalker.nextSibling[mdn]api.TreeWalker.parentNode[mdn]api.TreeWalker.previousNode[mdn]api.TreeWalker.previousSibling[mdn]api.TreeWalker.root[mdn]api.TreeWalker.whatToShow[mdn]api.Node.parentElement[mdn]api.Document.scripts[mdn]api.Element.outerHTML[mdn]api.NamedNodeMap[mdn]api.NamedNodeMap.getNamedItem[mdn]api.NamedNodeMap.getNamedItemNS[mdn]api.NamedNodeMap.item[mdn]api.NamedNodeMap.length[mdn]api.NamedNodeMap.removeNamedItem[mdn]api.NamedNodeMap.removeNamedItemNS[mdn]api.NamedNodeMap.setNamedItem[mdn]api.NamedNodeMap.setNamedItemNS[mdn]api.Node.compareDocumentPosition[mdn]api.Document.activeElement[mdn]api.Document.hasFocus[mdn]api.DocumentFragment.querySelector[mdn]api.DocumentFragment.querySelectorAll[mdn]api.Element.childElementCount[mdn]api.Element.firstElementChild[mdn]api.Element.lastElementChild[mdn]api.Element.nextElementSibling[mdn]api.Element.previousElementSibling[mdn]api.Text.wholeText[mdn]api.Document.head[mdn]api.HTMLElement.hidden[mdn]api.DOMTokenList[mdn]api.DOMTokenList.add[mdn]api.DOMTokenList.contains[mdn]api.DOMTokenList.item[mdn]api.DOMTokenList.length[mdn]api.DOMTokenList.remove[mdn]api.DOMTokenList.toString[mdn]api.DOMTokenList.toggle[mdn]api.Document.readystatechange_event[mdn]api.Node.contains[mdn]api.Element.className[mdn]api.Element.id[mdn]api.CharacterData.remove[mdn]api.DocumentType.remove[mdn]api.Element.remove[mdn]api.DOMTokenList.toggle.force_parameter[mdn]api.DOMTokenList.add.multiple_parameters[mdn]api.DOMTokenList.remove.multiple_parameters[mdn]api.Document.currentScript[mdn]api.Document.hidden[mdn]api.Document.visibilityState[mdn]api.Document.createTreeWalker.whatToShow_filter_parameters_optional[mdn]api.Node.lastChild[mdn]api.HTMLElement.innerText[mdn]api.Node.isSameNode[mdn]api.XMLDocument[mdn]api.DOMTokenList.trim_whitespace[mdn]api.Element.matches[mdn]api.Element.closest[mdn]api.Element.getElementsByClassName[mdn]api.Element.classList[mdn]api.Comment.Comment[mdn]api.Text.Text[mdn]api.Document.children[mdn]api.DocumentFragment.children[mdn]api.DOMTokenList.@@iterator[mdn]api.DOMTokenList.entries[mdn]api.DOMTokenList.forEach[mdn]api.DOMTokenList.keys[mdn]api.DOMTokenList.values[mdn]api.NodeList.entries[mdn]api.NodeList.forEach[mdn]api.NodeList.keys[mdn]api.NodeList.values[mdn]api.Document.dir[mdn]api.Document.embeds[mdn]api.Document.plugins[mdn]api.Document.close[mdn]api.Document.open[mdn]api.Document.documentURI[mdn]api.NodeIterator.pointerBeforeReferenceNode[mdn]api.NodeIterator.referenceNode[mdn]api.Element.insertAdjacentHTML[mdn]api.Element.insertAdjacentElement[mdn]api.Element.insertAdjacentText[mdn]api.DocumentFragment.DocumentFragment[mdn]api.CharacterData.nextElementSibling[mdn]api.CharacterData.previousElementSibling[mdn]api.Document.childElementCount[mdn]api.Document.firstElementChild[mdn]api.Document.lastElementChild[mdn]api.DocumentFragment.childElementCount[mdn]api.DocumentFragment.firstElementChild[mdn]api.DocumentFragment.lastElementChild[mdn]api.Document.contentType[mdn]api.DocumentFragment.getElementById[mdn]api.DOMTokenList.supports[mdn]api.DOMTokenList.value[mdn]api.CharacterData.after[mdn]api.CharacterData.before[mdn]api.CharacterData.replaceWith[mdn]api.Document.append[mdn]api.Document.prepend[mdn]api.DocumentFragment.append[mdn]api.DocumentFragment.prepend[mdn]api.DocumentType.after[mdn]api.DocumentType.before[mdn]api.DocumentType.replaceWith[mdn]api.Element.after[mdn]api.Element.append[mdn]api.Element.before[mdn]api.Element.prepend[mdn]api.Element.replaceWith[mdn]api.Document.Document[mdn]api.DOMTokenList.remove_duplicates[mdn]api.DOMTokenList.replace[mdn]api.Document.body[mdn]api.Element.getAttributeNames[mdn]api.DOMTokenList.replace.boolean_value[mdn]api.Element.toggleAttribute[mdn]api.NodeList.@@iterator[mdn]api.Document.replaceChildren[mdn]api.DocumentFragment.replaceChildren[mdn]api.Element.replaceChildren[mdn]api.Document.visibilitychange_event[mdn]api.HTMLElement.outerText[mdn]