Modelo de Objeto de Documento (DOM)
O Modelo de Objeto de Documento (DOM) interliga as páginas da Web para scripts ou linguagens de programação. Normalmente, isso significa que JavaScript, mas a modelagem de documentos HTML, SVG ou XML como objetos não é parte da linguagem de JavaScript. O modelo DOM representa um documento com uma árvore lógica. Cada ramo da árvore termina em um nodo, e cada nodo contém objetos. Os métodos DOM permitem o acesso programático à árvore; com eles, pode alterar a estrutura, o estilo ou o conteúdo do documento. Os nodos podem ter manipuladores de eventos anexados aos mesmos. Quando é acionado um evento, os manipuladores de eventos são executados .
Está disponível uma introdução ao DOM.
Interfaces DOM
Attr
(en-US)CharacterData
(en-US)ChildNode
(en-US)Comment
(en-US)CustomEvent
(en-US)Document
DocumentFragment
(en-US)DocumentType
(en-US)DOMError
(en-US)DOMException
(en-US)DOMImplementation
(en-US)DOMString
DOMTimeStamp
(en-US)DOMSettableTokenList
DOMStringList
(en-US)DOMTokenList
(en-US)Element
Event
(en-US)EventTarget
(en-US)HTMLCollection
(en-US)MutationObserver
(en-US)MutationRecord
(en-US)Node
NodeFilter
(en-US)NodeIterator
(en-US)NodeList
(en-US)ParentNode
(en-US)ProcessingInstruction
(en-US)Range
(en-US)Text
(en-US)TreeWalker
(en-US)URL
(en-US)Window
Worker
XMLDocument
(en-US)
Interfaces DOM obsoletas
The Document Object Model has been highly simplified. To achieve this, the following interfaces present in the different DOM level 3 or earlier specification have been removed. It is still not very clear whether some may be reintroduced or not, but for the time being they have to be considered as obsolete and should be avoided:
Interfaces HTML
A document containing HTML is described using the HTMLDocument
(en-US) interface. Note that the HTML specification also extends the Document
interface.
An HTMLDocument
object also gives access to various features of browsers like the ta 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
(en-US). Eventually, Selection
is done on the document.
Interfaces de elemento HTML
HTMLAnchorElement
(en-US)HTMLAppletElement
HTMLAreaElement
(en-US)HTMLAudioElement
(en-US)HTMLBaseElement
(en-US)HTMLBodyElement
(en-US)HTMLBRElement
(en-US)HTMLButtonElement
(en-US)HTMLCanvasElement
(en-US)HTMLDataElement
(en-US)HTMLDataListElement
(en-US)HTMLDialogElement
(en-US)HTMLDirectoryElement
HTMLDivElement
(en-US)HTMLDListElement
(en-US)HTMLElement
(en-US)HTMLEmbedElement
(en-US)HTMLFieldSetElement
(en-US)HTMLFontElement
(en-US)HTMLFormElement
(en-US)HTMLFrameElement
HTMLFrameSetElement
(en-US)HTMLHeadElement
(en-US)HTMLHeadingElement
(en-US)HTMLHtmlElement
(en-US)HTMLHRElement
(en-US)HTMLIFrameElement
(en-US)HTMLImageElement
(en-US)HTMLInputElement
(en-US)HTMLKeygenElement
(en-US)HTMLLabelElement
(en-US)HTMLLegendElement
(en-US)HTMLLIElement
(en-US)HTMLLinkElement
(en-US)HTMLMapElement
(en-US)HTMLMediaElement
(en-US)HTMLMenuElement
(en-US)HTMLMetaElement
(en-US)HTMLMeterElement
(en-US)HTMLModElement
(en-US)HTMLObjectElement
(en-US)HTMLOListElement
(en-US)HTMLOptGroupElement
(en-US)HTMLOptionElement
(en-US)HTMLOutputElement
(en-US)HTMLParagraphElement
(en-US)HTMLParamElement
(en-US)HTMLPreElement
(en-US)HTMLProgressElement
(en-US)HTMLQuoteElement
(en-US)HTMLScriptElement
(en-US)HTMLSelectElement
(en-US)HTMLSourceElement
(en-US)HTMLSpanElement
(en-US)HTMLStyleElement
(en-US)HTMLTableElement
(en-US)HTMLTableCaptionElement
(en-US)HTMLTableCellElement
(en-US)HTMLTableDataCellElement
(en-US)HTMLTableHeaderCellElement
(en-US)HTMLTableColElement
(en-US)HTMLTableRowElement
(en-US)HTMLTableSectionElement
(en-US)HTMLTextAreaElement
(en-US)HTMLTimeElement
(en-US)HTMLTitleElement
(en-US)HTMLTrackElement
(en-US)HTMLUListElement
(en-US)HTMLUnknownElement
(en-US)HTMLVideoElement
(en-US)
Outras interfaces
CanvasRenderingContext2D
(en-US)CanvasGradient
(en-US)CanvasPattern
(en-US)TextMetrics
(en-US)ImageData
(en-US)CanvasPixelArray
(en-US)NotifyAudioAvailableEvent
(en-US)HTMLAllCollection
HTMLFormControlsCollection
(en-US)HTMLOptionsCollection
(en-US)HTMLPropertiesCollection
DOMStringMap
(en-US)RadioNodeList
(en-US)MediaError
(en-US)
Interfaces HTML obsoletas
SGV - Interfaces
Interfaces de elemento SVG
SVGAElement
(en-US)SVGAltGlyphElement
(en-US)SVGAltGlyphDefElement
(en-US)SVGAltGlyphItemElement
(en-US)SVGAnimationElement
(en-US)SVGAnimateElement
(en-US)SVGAnimateColorElement
(en-US)SVGAnimateMotionElement
(en-US)SVGAnimateTransformElement
(en-US)SVGCircleElement
(en-US)SVGClipPathElement
(en-US)SVGColorProfileElement
(en-US)SVGComponentTransferFunctionElement
(en-US)SVGCursorElement
(en-US)SVGDefsElement
(en-US)SVGDescElement
(en-US)SVGElement
(en-US)SVGEllipseElement
(en-US)SVGFEBlendElement
(en-US)SVGFEColorMatrixElement
(en-US)SVGFEComponentTransferElement
(en-US)SVGFECompositeElement
(en-US)SVGFEConvolveMatrixElement
(en-US)SVGFEDiffuseLightingElement
(en-US)SVGFEDisplacementMapElement
(en-US)SVGFEDistantLightElement
(en-US)SVGFEDropShadowElement
(en-US)SVGFEFloodElement
(en-US)SVGFEFuncAElement
(en-US)SVGFEFuncBElement
(en-US)SVGFEFuncGElement
(en-US)SVGFEFuncRElement
(en-US)SVGFEGaussianBlurElement
(en-US)SVGFEImageElement
(en-US)SVGFEMergeElement
(en-US)SVGFEMergeNodeElement
(en-US)SVGFEMorphologyElement
(en-US)SVGFEOffsetElement
(en-US)SVGFEPointLightElement
(en-US)SVGFESpecularLightingElement
(en-US)SVGFESpotLightElement
(en-US)SVGFETileElement
(en-US)SVGFETurbulenceElement
(en-US)SVGFilterElement
(en-US)SVGFilterPrimitiveStandardAttributes
(en-US)SVGFontElement
(en-US)SVGFontFaceElement
(en-US)SVGFontFaceFormatElement
(en-US)SVGFontFaceNameElement
(en-US)SVGFontFaceSrcElement
(en-US)SVGFontFaceUriElement
(en-US)SVGForeignObjectElement
(en-US)SVGGElement
(en-US)SVGGeometryElement
(en-US)SVGGlyphElement
(en-US)SVGGlyphRefElement
(en-US)SVGGradientElement
(en-US)SVGGraphicsElement
(en-US)SVGHatchElement
SVGHatchpathElement
SVGHKernElement
(en-US)SVGImageElement
(en-US)SVGLinearGradientElement
(en-US)SVGLineElement
(en-US)SVGMarkerElement
SVGMaskElement
(en-US)SVGMeshElement
SVGMeshGradientElement
SVGMeshpatchElement
SVGMeshrowElement
SVGMetadataElement
(en-US)SVGMissingGlyphElement
(en-US)SVGMPathElement
(en-US)SVGPathElement
(en-US)SVGPatternElement
(en-US)SVGPolylineElement
(en-US)SVGPolygonElement
(en-US)SVGRadialGradientElement
(en-US)SVGRectElement
(en-US)SVGScriptElement
(en-US)SVGSetElement
(en-US)SVGSolidcolorElement
(en-US)SVGStopElement
(en-US)SVGStyleElement
(en-US)SVGSVGElement
(en-US)SVGSwitchElement
(en-US)SVGSymbolElement
(en-US)SVGTextContentElement
(en-US)SVGTextElement
(en-US)SVGTextPathElement
(en-US)SVGTextPositioningElement
(en-US)SVGTitleElement
(en-US)SVGTRefElement
(en-US)SVGTSpanElement
(en-US)SVGUseElement
(en-US)SVGUnknownElement
SVGViewElement
(en-US)SVGVKernElement
(en-US)
Interfaces de tipo de dados SVG
Here are the DOM API for data types used in the definitions of SVG properties and attributes.
Nota: 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
(en-US), SVGNumberList
(en-US), SVGPathSegList
, and SVGPointList
.
Tipo estático
SVGAngle
(en-US)SVGColor
SVGICCColor
SVGElementInstance
SVGElementInstanceList
SVGLength
(en-US)SVGLengthList
(en-US)SVGMatrix
(en-US)SVGNameList
SVGNumber
(en-US)SVGNumberList
(en-US)SVGPaint
SVGPathSeg
SVGPathSegClosePath
SVGPathSegMovetoAbs
SVGPathSegMovetoRel
SVGPathSegLinetoAbs
SVGPathSegLinetoRel
SVGPathSegCurvetoCubicAbs
SVGPathSegCurvetoCubicRel
SVGPathSegCurvetoQuadraticAbs
SVGPathSegCurvetoQuadraticRel
SVGPathSegArcAbs
SVGPathSegArcRel
SVGPathSegLinetoHorizontalAbs
SVGPathSegLinetoHorizontalRel
SVGPathSegLinetoVerticalAbs
SVGPathSegLinetoVerticalRel
SVGPathSegCurvetoCubicSmoothAbs
SVGPathSegCurvetoCubicSmoothRel
SVGPathSegCurvetoQuadraticSmoothAbs
SVGPathSegCurvetoQuadraticSmoothRel
SVGPathSegList
SVGPoint
(en-US)SVGPointList
SVGPreserveAspectRatio
(en-US)SVGRect
(en-US)SVGStringList
(en-US)SVGTransform
(en-US)SVGTransformList
(en-US)
Tipo animado
SVGAnimatedAngle
(en-US)SVGAnimatedBoolean
(en-US)SVGAnimatedEnumeration
(en-US)SVGAnimatedInteger
(en-US)SVGAnimatedLength
(en-US)SVGAnimatedLengthList
(en-US)SVGAnimatedNumber
(en-US)SVGAnimatedNumberList
(en-US)SVGAnimatedPathData
SVGAnimatedPoints
(en-US)SVGAnimatedPreserveAspectRatio
(en-US)SVGAnimatedRect
(en-US)SVGAnimatedString
(en-US)SVGAnimatedTransformList
(en-US)
Interfaces relacionadas com SMIL
Outras interfaces SVG
GetSVGDocument
ShadowAnimation
SVGColorProfileRule
SVGCSSRule
SVGDocument
SVGException
SVGExternalResourcesRequired
(en-US)SVGFitToViewBox
SVGLangSpace
SVGLocatable
SVGRenderingIntent
(en-US)SVGStylable
(en-US)SVGTests
(en-US)SVGTransformable
(en-US)SVGUnitTypes
(en-US)SVGUseElementShadowRoot
SVGURIReference
(en-US)SVGViewSpec
SVGZoomAndPan
(en-US)SVGZoomEvent