TEST:dom

Jump to: navigation, search

DOM


Summary

The Document Object Model (DOM) is an application programming interface (API) for markup documents, like HTML, SVG, MathML, and XML. The DOM provides a logically structured representation of a document, and a set of Objects and Methods for manipulating that structure.

The Document Object Model (DOM) is an application programming interface (API) for markup documents, like HTML, SVG, MathML, and XML. The DOM provides a logically structured representation of a document, and a set of Objects and Methods for manipulating that structure.

Explore our DOM docs

DOM learning material

Tutorials and concept articles to teach you DOM manipulation from scratch.

Language features

A reference guide to DOM fundamental concepts.


Objects

A reference guide to all the core DOM objects.


Events

A reference guide to the available core DOM events.



Methods

A reference guide to the methods available for DOM manipulation.


Note: If you are completely new to web development, you may want to review Web development for beginners.

Background

When a markup document is parsed by a browser, it converts the document in a tree structure called the document object model, or DOM. This model can then be used to access and manipulate existing elements in the document, and create new ones, an essential set of activities when creating dynamic page functionality.

  • First version: It was 1997 when browser vendors involved in the W3C decided to agree on a single standardised document object model, to make cross browser coding less of a nightmare.
  • Current stable version: DOM level 3 is the most stable version, the specification of which is split up into different parts, all of whom have made it to recommendation status. You can find a list of all DOM publications at [technical reports]
  • Current and future work: [level 4] is the current nascent version of the DOM being worked on.

Contributing to DOM development

The DOM is being worked on by the [applications working group]; visit their mailing lists for discussion, and contribution of ideas.


Index of all DOM topics

dom/AnimationEventdom/AnimationEvent/animationNamedom/AnimationEvent/elapsedTime
dom/AnimationEvent/initAnimationEventdom/BeforeUnloadEventdom/BeforeUnloadEvent/returnValue
dom/CDATASectiondom/CSSFontFaceRuledom/CharacterData
dom/CharacterData/appendDatadom/CharacterData/datadom/CharacterData/deleteData
dom/CharacterData/insertDatadom/CharacterData/lengthdom/CharacterData/replaceData
dom/CharacterData/substringDatadom/CloseEventdom/CloseEvent/code
dom/CloseEvent/initCloseEventdom/CloseEvent/wasCleandom/Comment
dom/CompositionEventdom/CompositionEvent/datadom/CompositionEvent/initCompositionEvent
dom/CompositionEvent/localedom/CustomEventdom/CustomEvent/detail
dom/CustomEvent/initCustomEventdom/DOMErrordom/DOMError/name
dom/DOMError/toStringdom/DOMExceptiondom/DOMException/message
dom/DOMSettableTokenListdom/DOMStringListdom/DOMStringList/contains
dom/DOMTokenListdom/DOMTokenList/containsdom/DOMTokenList/toString
dom/DOMTokenList/toggledom/DataTransferdom/DataTransfer/clearData
dom/DataTransfer/dropEffectdom/DataTransfer/effectAlloweddom/DataTransfer/getData
dom/DataTransfer/setDatadom/DataTransfer/typesdom/Document
dom/Document/activeElementdom/Document/adoptNodedom/Document/applet
dom/Document/bodydom/Document/characterSetdom/Document/charset
dom/Document/closedom/Document/cookiedom/Document/createAttribute
dom/Document/createAttributeNSdom/Document/createCDATASectiondom/Document/createComment
dom/Document/createDocumentFragmentdom/Document/createElementdom/Document/createElementNS
dom/Document/createEventdom/Document/createNodeIteratordom/Document/createProcessingInstruction
dom/Document/createRangedom/Document/createStyleSheetdom/Document/createTextNode
dom/Document/createTreeWalkerdom/Document/defaultCharsetdom/Document/defaultView
dom/Document/designModedom/Document/doctypedom/Document/documentElement
dom/Document/elementFromPointdom/Document/exitFullscreendom/Document/forms
dom/Document/fullscreenElementdom/Document/fullscreenEnableddom/Document/getElementById
dom/Document/getElementsByNamedom/Document/getElementsByTagNameNSdom/Document/getNamedFlows
dom/Document/hasFocusdom/Document/headdom/Document/hidden
dom/Document/implementationdom/Document/importNodedom/Document/inputEncoding
dom/Document/lastModifieddom/Document/linkColordom/Document/links
dom/Document/opendom/Document/readyStatedom/Document/referrer
dom/Document/registerdom/Document/releaseCapturedom/Document/rowenter
dom/Document/rowexitdom/Document/rowsdeletedom/Document/rowsinserted
dom/Document/scriptsdom/Document/scrolldom/Document/select
dom/Document/selectionchangedom/Document/selectstartdom/Document/start
dom/Document/stopdom/Document/storagedom/Document/storagecommit
dom/Document/visibilityStatedom/Document/visibilitychangedom/Document/vlinkColor
dom/Document/writedom/Document/writelndom/Document/xmlEncoding
dom/Document/xmlStandalonedom/Document/xmlVersiondom/DocumentType
dom/DocumentType/namedom/DocumentType/publicIddom/DocumentType/systemId
dom/DragEventdom/DragEvent/dataTransferdom/DragEvent/drag
dom/DragEvent/dragenddom/DragEvent/dragenterdom/DragEvent/dragleave
dom/DragEvent/dragoverdom/DragEvent/dragstartdom/DragEvent/drop
dom/DragEvent/initDragEventdom/Elementdom/Element/RangeException
dom/Element/changedom/Element/childElementCountdom/Element/children
dom/Element/classListdom/Element/codedom/Element/createControlRange
dom/Element/cuechangedom/Element/durationchangedom/Element/emptied
dom/Element/endeddom/Element/entitiesdom/Element/error
dom/Element/firstElementChilddom/Element/getAdjacentTextdom/Element/getAttribute
dom/Element/getAttributeNSdom/Element/getAttributeNodedom/Element/getAttributeNodeNS
dom/Element/hasAttributedom/Element/hasAttributeNSdom/Element/hashchange
dom/Element/helpdom/Element/htmlTextdom/Element/inRange
dom/Element/inputdom/Element/insertAdjacentHTMLdom/Element/internalSubset
dom/Element/isEqualdom/Element/isTextEditdom/Element/item
dom/Element/lastElementChilddom/Element/layoutcompletedom/Element/load
dom/Element/loadeddatadom/Element/loadedmetadatadom/Element/loadstart
dom/Element/losecapturedom/Element/mediadom/Element/message
dom/Element/movedom/Element/moveenddom/Element/movestart
dom/Element/nextElementSiblingdom/Element/notationsdom/Element/offline
dom/Element/oneTimeOnlydom/Element/onerrordom/Element/online
dom/Element/onloaddom/Element/onloadenddom/Element/onloadstart
dom/Element/onprogressdom/Element/ownerElementdom/Element/page
dom/Element/parentdom/Element/parentElementdom/Element/parentTextEdit
dom/Element/pastedom/Element/pausedom/Element/play
dom/Element/playingdom/Element/previousElementSiblingdom/Element/propertychange
dom/Element/ratechangedom/Element/readyStatedom/Element/readystatechange
dom/Element/releasePointerCapturedom/Element/removeAttributedom/Element/removeAttributeNS
dom/Element/removeAttributeNodedom/Element/requestFullscreendom/Element/requestPointerLock
dom/Element/resetdom/Element/resizedom/Element/resizeend
dom/Element/resizestartdom/Element/resultdom/Element/scrollByLines
dom/Element/scrollByPagesdom/Element/scrollIntoViewdom/Element/scrollIntoViewIfNeeded
dom/Element/seekeddom/Element/seekingdom/Element/setAttribute
dom/Element/setAttributeNSdom/Element/setAttributeNodedom/Element/setAttributeNodeNS
dom/Element/setPointerCapturedom/Element/sizedom/Element/stalled
dom/Element/submitdom/Element/suspenddom/Element/systemLanguage
dom/Element/timeupdatedom/Element/typedom/Element/unload
dom/Element/volumechangedom/Element/waitingdom/Error
dom/Error/colnodom/Error/initErrorEventdom/Error/lineno
dom/Eventdom/Event/DOMContentLoadeddom/Event/afterprint
dom/Event/afterupdatedom/Event/beforeactivatedom/Event/beforecopy
dom/Event/beforecutdom/Event/beforedeactivatedom/Event/beforeeditfocus
dom/Event/beforepastedom/Event/beforeprintdom/Event/beforeunload
dom/Event/beforeupdatedom/Event/bouncedom/Event/bubbles
dom/Event/cancelabledom/Event/cellchangedom/Event/change
dom/Event/contextmenudom/Event/controlselectdom/Event/copy
dom/Event/currentTargetdom/Event/cutdom/Event/dataavailable
dom/Event/datasetchangeddom/Event/datasetcompletedom/Event/deactivate
dom/Event/defaultPreventeddom/Event/errordom/Event/errorupdate
dom/Event/eventPhasedom/Event/filterchangedom/Event/finish
dom/Event/initEventdom/Event/isTrusteddom/Event/preventDefault
dom/Event/stopImmediatePropagationdom/Event/stopPropagationdom/Event/target
dom/Event/timeStampdom/Event/typedom/EventException
dom/EventTargetdom/EventTarget/addEventListenerdom/EventTarget/dispatchEvent
dom/EventTarget/removeEventListenerdom/FocusEventdom/FocusEvent/blur
dom/FocusEvent/focusdom/FocusEvent/focusindom/FocusEvent/focusout
dom/FocusEvent/initFocusEventdom/FormDatadom/FormData/append
dom/HTMLAllCollectiondom/HTMLAnchorElementdom/HTMLAnchorElement/select
dom/HTMLAppletElementdom/HTMLAppletElement/objectdom/HTMLAreaElement
dom/HTMLAudioElementdom/HTMLBGSoundElementdom/HTMLBRElement
dom/HTMLBaseElementdom/HTMLBaseElement/replaceAdjacentTextdom/HTMLBaseFontElement
dom/HTMLBlockElementdom/HTMLBodyElementdom/HTMLButtonElement
dom/HTMLCanvasElementdom/HTMLCollectiondom/HTMLCollection/item
dom/HTMLCollection/lengthdom/HTMLCollection/namedItemdom/HTMLDDElement
dom/HTMLDListElementdom/HTMLDTElementdom/HTMLDirectoryElement
dom/HTMLDivElementdom/HTMLDocumentCompatibleInfodom/HTMLElement
dom/HTMLElement/abortdom/HTMLElement/applicationNamedom/HTMLElement/attribute
dom/HTMLElement/blurdom/HTMLElement/canHaveHTMLdom/HTMLElement/cellIndex
dom/HTMLElement/classNamedom/HTMLElement/clearAttributesdom/HTMLElement/click
dom/HTMLElement/clientHeightdom/HTMLElement/clientLeftdom/HTMLElement/clientTop
dom/HTMLElement/clientWidthdom/HTMLElement/componentFromPointdom/HTMLElement/controlRange
dom/HTMLElement/createdom/HTMLElement/dirdom/HTMLElement/disabled
dom/HTMLElement/doScrolldom/HTMLElement/documentdom/HTMLElement/domain
dom/HTMLElement/draggabledom/HTMLElement/elementsdom/HTMLElement/embeds
dom/HTMLElement/focusdom/HTMLElement/formdom/HTMLElement/frameElement