The Document Object Model (DOM) connects web pages to scripts or programming languages. Usually that means JavaScript, although modelling HTML, SVG, or XML documents as objects is not part of the JavaScript language, as such.
The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree; with them you can change the document's structure, style, or content. Nodes can also have event handlers attached to them; once an event is triggered, the event handlers get executed.
An introduction to the DOM is available.
DOM interfaces
AttrCDATASectionCharacterDataChildNodeCommentCustomEventDocumentDocumentFragmentDocumentTypeDOMErrorDOMExceptionDOMImplementationDOMStringDOMTimeStampDOMStringListDOMTokenListElementEventEventTargetHTMLCollectionMutationObserverMutationRecordNamedNodeMapNodeNodeFilterNodeIteratorNodeListNonDocumentTypeChildNodeParentNodeProcessingInstructionSelectionRangeTextTextDecoderTextEncoderTimeRangesTreeWalkerURLWindowWorkerXMLDocument
Obsolete DOM interfaces
The Document Object Model has been highly simplified. To achieve this, the following interfaces present in the different DOM level 3 or earlier specifications have been removed. It is uncertain whether some may be reintroduced in the future or not, but for the time being they should be considered obsolete and should be avoided:
HTML interfaces
A document containing HTML is described using the Document interface, which is extended by the HTML specification to include various HTML-specific features.
An HTML document object also gives access to various features of browsers like the tab or the window, in which a page is drawn using the Window interface, the Style associated to it (usually CSS), the history of the browser relative to the context, History. Eventually, Selection is done on the document.
HTML element interfaces
HTMLAnchorElementHTMLAppletElementHTMLAreaElementHTMLAudioElementHTMLBaseElementHTMLBodyElementHTMLBRElementHTMLButtonElementHTMLCanvasElementHTMLDataElementHTMLDataListElementHTMLDialogElementHTMLDirectoryElementHTMLDivElementHTMLDListElementHTMLElementHTMLEmbedElementHTMLFieldSetElementHTMLFontElementHTMLFormElementHTMLFrameElementHTMLFrameSetElementHTMLHeadElementHTMLHeadingElementHTMLHtmlElementHTMLHRElementHTMLIFrameElementHTMLImageElementHTMLInputElementHTMLKeygenElementHTMLLabelElementHTMLLegendElementHTMLLIElementHTMLLinkElementHTMLMapElementHTMLMarqueeElementHTMLMediaElementHTMLMenuElementHTMLMenuItemElementHTMLMetaElementHTMLMeterElementHTMLModElementHTMLObjectElementHTMLOListElementHTMLOptGroupElementHTMLOptionElementHTMLOutputElementHTMLParagraphElementHTMLParamElementHTMLPreElementHTMLProgressElementHTMLQuoteElementHTMLScriptElementHTMLSelectElementHTMLSourceElementHTMLSpanElementHTMLStyleElementHTMLTableElementHTMLTableCaptionElementHTMLTableCellElementHTMLTableDataCellElementHTMLTableHeaderCellElementHTMLTableColElementHTMLTableRowElementHTMLTableSectionElementHTMLTextAreaElementHTMLTimeElementHTMLTitleElementHTMLTrackElementHTMLUListElementHTMLUnknownElementHTMLVideoElement
Other interfaces
Obsolete HTML interfaces
SVG interfaces
SVG element interfaces
SVGAElementSVGAltGlyphElementSVGAltGlyphDefElementSVGAltGlyphItemElementSVGAnimationElementSVGAnimateElementSVGAnimateColorElementSVGAnimateMotionElementSVGAnimateTransformElementSVGCircleElementSVGClipPathElementSVGColorProfileElementSVGComponentTransferFunctionElementSVGCursorElementSVGDefsElementSVGDescElementSVGElementSVGEllipseElementSVGFEBlendElementSVGFEColorMatrixElementSVGFEComponentTransferElementSVGFECompositeElementSVGFEConvolveMatrixElementSVGFEDiffuseLightingElementSVGFEDisplacementMapElementSVGFEDistantLightElementSVGFEDropShadowElementSVGFEFloodElementSVGFEFuncAElementSVGFEFuncBElementSVGFEFuncGElementSVGFEFuncRElementSVGFEGaussianBlurElementSVGFEImageElementSVGFEMergeElementSVGFEMergeNodeElementSVGFEMorphologyElementSVGFEOffsetElementSVGFEPointLightElementSVGFESpecularLightingElementSVGFESpotLightElementSVGFETileElementSVGFETurbulenceElementSVGFilterElementSVGFilterPrimitiveStandardAttributesSVGFontElementSVGFontFaceElementSVGFontFaceFormatElementSVGFontFaceNameElementSVGFontFaceSrcElementSVGFontFaceUriElementSVGForeignObjectElementSVGGElementSVGGeometryElementSVGGlyphElementSVGGlyphRefElementSVGGradientElementSVGGraphicsElementSVGHatchElementSVGHatchpathElementSVGHKernElementSVGImageElementSVGLinearGradientElementSVGLineElementSVGMarkerElementSVGMaskElementSVGMeshElementSVGMeshGradientElementSVGMeshpatchElementSVGMeshrowElementSVGMetadataElementSVGMissingGlyphElementSVGMPathElementSVGPathElementSVGPatternElementSVGPolylineElementSVGPolygonElementSVGRadialGradientElementSVGRectElementSVGScriptElementSVGSetElementSVGSolidcolorElementSVGStopElementSVGStyleElementSVGSVGElementSVGSwitchElementSVGSymbolElementSVGTextContentElementSVGTextElementSVGTextPathElementSVGTextPositioningElementSVGTitleElementSVGTRefElementSVGTSpanElementSVGUseElementSVGUnknownElementSVGViewElementSVGVKernElement
SVG data type interfaces
Here are the DOM APIs for data types used in the definitions of SVG properties and attributes.
Note: Starting in Gecko 5.0, the following SVG-related DOM interfaces representing lists of objects are now indexable and can be accessed; in addition, they have a length property indicating the number of items in the lists: SVGLengthList, SVGNumberList, SVGPathSegList, and SVGPointList.
Static type
SVGAngleSVGColorSVGICCColorSVGElementInstanceSVGElementInstanceListSVGLengthSVGLengthListSVGMatrixSVGNameListSVGNumberSVGNumberListSVGPaintSVGPathSegSVGPathSegClosePathSVGPathSegMovetoAbsSVGPathSegMovetoRelSVGPathSegLinetoAbsSVGPathSegLinetoRelSVGPathSegCurvetoCubicAbsSVGPathSegCurvetoCubicRelSVGPathSegCurvetoQuadraticAbsSVGPathSegCurvetoQuadraticRelSVGPathSegArcAbsSVGPathSegArcRelSVGPathSegLinetoHorizontalAbsSVGPathSegLinetoHorizontalRelSVGPathSegLinetoVerticalAbsSVGPathSegLinetoVerticalRelSVGPathSegCurvetoCubicSmoothAbsSVGPathSegCurvetoCubicSmoothRelSVGPathSegCurvetoQuadraticSmoothAbsSVGPathSegCurvetoQuadraticSmoothRelSVGPathSegListSVGPointSVGPointListSVGPreserveAspectRatioSVGRectSVGStringListSVGTransformSVGTransformList
Animated type
SMIL related interfaces
Other SVG interfaces
GetSVGDocumentShadowAnimationSVGColorProfileRuleSVGCSSRuleSVGDocumentSVGExceptionSVGExternalResourcesRequiredSVGFitToViewBoxSVGLangSpaceSVGLocatableSVGRenderingIntentSVGStylableSVGTestsSVGTransformableSVGUnitTypesSVGUseElementShadowRootSVGURIReferenceSVGViewSpecSVGZoomAndPanSVGZoomEvent
Specifications
| Specification | Status | Comment |
|---|---|---|
| DOM | Living Standard | |
| DOM4 | Obsolete | |
| Document Object Model (DOM) Level 3 Core Specification | Obsolete | |
| Document Object Model (DOM) Level 2 Core Specification | Obsolete | |
| Document Object Model (DOM) Level 1 Specification | Obsolete | Initial definition |