Esta tradução está incompleta. Por favor, ajude a traduzir este artigo do Inglês.

Element é a classe base mais geral da qual todos os objetos em um documento herdam. Este só tem métodos e propriedades comuns para todos os tipos de elementos. Classes mais específicas herdam de Element. Por exemplo, a interface HTMLElement é a interface base para os elementos HTML, enquanto a interface SVGElement é a base para todos os elementos SVG. A maioria das funcionalidades é especificada mais abaixo na hierarquia de classes.

Linguagens fora do âmbito da plataforma Web, como XUL através da interface XULElement, também implementa Element.

Propriedades

Inherits properties from its parent interface, Node, and by extension that interface's parent, EventTarget. It implements the properties of ParentNode, ChildNode, NonDocumentTypeChildNode, and Animatable.

Nome Descrição Tipo Dosponibilidade
attibutes Todos os atributos associados ao elemento NamedNodeMap All
childNodes Todos os nós-filhos de um elemento. NodeList All
className Retorna ou define a classe do elemento. String HTML, XUL
clientHeight A altura interna de um elemento. Number HTML
clientLeft A largura da borda esquerda de um elemento. Number HTML
clientTop A largura da borda superior de um elemento. Number HTML
clientWidth A largura interna de um elemento. Number HTML
dir Retorna ou define a direcionalidade do elemento. String HTML, XUL
firstChild O primeiro nó-filho direto de um elemento, ou null se o elemento não tem nós-filhos. Node All
id Retorna ou define o id do elemento. String HTML, XUL
innerHTML Retorna ou define a marcação e o conteúdo de um elemento. String HTML
lang Retorna ou define o atributo linguagem de um elemento, texto, e conteúdo do elemento. String HTML
lastChild O último nó-filho direto de um elemento, ou null se o elemento não tem nós-filhos. Node All
localName A parte local de um nome qualificado de um elemento. String All
Nome Descrição Tipo Disponibilidade
name Retorna/define o atributo name de um elemento. String HTML
namespaceURI A URI de namespace do nó, ou null se não está especificado. String All
nextSibling O nó imediatamente seguinte ao dado numa árvore, ou null se não existe nó-irmão. Node All
nodeName O nome do nó. String All
nodeType Um número representando o tipo do nó. É sempre igual a 1 para elementos DOM. Number All
nodeValue O valor do nó. É sempre igual a null para elementos DOM. String All
offsetHeight A altura de um elemento, em relação ao layout. Number HTML
offsetLeft A distância da borda esquerda do elemento para o a borda esquerda do seu offsetParent. Number HTML
offsetParent O elemento para o qual todos cálculos de offset estão atualmente computados. Element HTML
offsetTop A distância da borda superior do elemento para o a borda superior do seu offsetParent. Number HTML
offsetWidth A largura de um elemento, em relação ao layout. Number HTML
ownerDocument O documento no qual o nó está, ou null se o nó não está dentro de nenhum. Document All
Nome Descrição Tipo Disponibilidade
parentNode The parent element of this node, or null if the node is not inside of a DOM Document. Node All
prefix The namespace prefix of the node, or null if no prefix is specified. String All
previousSibling The node immediately preceding the given one in the tree, or null if there is no sibling node. Node All
scrollHeight The scroll view height of an element. Number HTML
scrollLeft Gets/sets the left scroll offset of an element. Number HTML
scrollTop Gets/sets the top scroll offset of an element. Number HTML
scrollWidth The scroll view width of an element. Number HTML
style An object representing the declarations of an element's style attributes. CSSStyle HTML, XUL
tabIndex Gets/sets the position of the element in the tabbing order. Number HTML
tagName The name of the tag for the given element. String All
textContent Gets/sets the textual contents of an element and all its descendants. String All

Métodos

Nome & Descrição Retorna Disponibilidade
addEventListener( type, listener, useCapture )
Register an event handler to a specific event type on the element.
- All
appendChild( appendedNode )
Insert a node as the last child node of this element.
Node All
blur()
Removes keyboard focus from the current element.
- HTML, XUL
click()
Simulates a click on the current element.
- HTML, XUL
cloneNode( deep )
Clone a node, and optionally, all of its contents.
Node All
dispatchEvent( event )
Dispatch an event to this node in the DOM.
Boolean All
focus()
Gives keyboard focus to the current element.
- HTML, XUL
getAttribute( name )
Retrieve the value of the named attribute from the current node.
Object All
getAttributeNS( namespace, name )
Retrieve the value of the attribute with the specified name and namespace, from the current node.
Object All
getAttributeNode( name )
Retrieve the node representation of the named attribute from the current node.
Attr All
getAttributeNodeNS( namespace, name )
Retrieve the node representation of the attribute with the specified name and namespace, from the current node.
Attr All
Nome & Descrição Retorna Disponibilidade
getElementsByTagName( name )
Retrieve a set of all descendant elements, of a particular tag name, from the current element.
NodeSet All
getElementsByTagNameNS( namespace, name )
Retrieve a set of all descendant elements, of a particular tag name and namespace, from the current element.
NodeSet All
hasAttribute( name )
Check if the element has the specified attribute, or not.
Boolean All
hasAttributeNS( namespace, name )
Check if the element has the specified attribute, in the specified namespace, or not.
Boolean All
hasAttributes()
Check if the element has any attributes, or not.
Boolean All
hasChildNodes()
Check if the element has any child nodes, or not.
Boolean All
insertBefore( insertedNode, adjacentNode )
Inserts the first node before the second, child, Node in the DOM.
Node All
normalize()
Clean up all the text nodes under this element (merge adjacent, remove empty).
- All
removeAttribute( name )
Remove the named attribute from the current node.
- All
removeAttributeNS( namespace, name )
Remove the attribute with the specified name and namespace, from the current node.
- All
Nome & Descrição Retorna Disponibilidade
removeAttributeNode( name )
Remove the node representation of the named attribute from the current node.
- All
removeChild( removedNode )
Removes a child node from the current element.
Node All
removeEventListener( type, handler, useCapture )
Removes an event listener from the element.
- All
replaceChild( insertedNode, replacedNode )
Replaces one child node in the current element with another.
Node All
scrollIntoView( alignWithTop )
Scrolls the page until the element gets into the view.
- HTML
setAttribute( name, value )
Set the value of the named attribute from the current node.
- All
setAttributeNS( namespace, name, value )
Set the value of the attribute with the specified name and namespace, from the current node.
- All
setAttributeNode( name, attrNode )
Set the node representation of the named attribute from the current node.
- All
setAttributeNodeNS( namespace, name, attrNode )
Set the node representation of the attribute with the specified name and namespace, from the current node.
- All

Event Handlers

These are properties that correspond to the HTML 'on' event attributes.

Unlike the corresponding attributes, the values of these properties are functions (or any other object implementing the EventListener interface) rather than a string. In fact, assigning an event attribute in HTML creates a wrapper function around the specified code. For example, given the following HTML:

<div onclick="foo();">click me!</div>

If element is a reference to this div, the value of element.onclick is effectively:

function onclick(event) {
   foo();
}

Note how the event object is passed as parameter event to this wrapper function.

onblur
Returns the event handling code for the blur event.
onchange
Returns the event handling code for the change event.
onclick
Returns the event handling code for the click event.
ondblclick
Returns the event handling code for the dblclick event.
onfocus
Returns the event handling code for the focus event.
onkeydown
Returns the event handling code for the keydown event.
onkeypress
Returns the event handling code for the keypress event.
onkeyup
Returns the event handling code for the keyup event.
onmousedown
Returns the event handling code for the mousedown event.
onmousemove
Returns the event handling code for the mousemove event.
onmouseout
Returns the event handling code for the mouseout event.
onmouseover
Returns the event handling code for the mouseover event.
onmouseup
Returns the event handling code for the mouseup event.
onresize
Returns the event handling code for the resize event.
onscroll
Returns the event handling code for the scroll event.
 

Compatibilidade de navegador

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support 1Edge Full support YesFirefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
accessKeyChrome No support No
Notes
No support No
Notes
Notes Implemented on HTMLElement.
Edge ? Firefox ? IE ? Opera No support No
Notes
No support No
Notes
Notes Implemented on HTMLElement.
Safari ? WebView Android No support No
Notes
No support No
Notes
Notes Implemented on HTMLElement.
Chrome Android No support No
Notes
No support No
Notes
Notes Implemented on HTMLElement.
Edge Mobile ? Firefox Android ? Opera Android No support No
Notes
No support No
Notes
Notes Implemented on HTMLElement.
Safari iOS ? Samsung Internet Android ?
animate
Experimental
Chrome Full support 36Edge No support NoFirefox Full support 48IE No support NoOpera Full support 23Safari No support NoWebView Android Full support 37Chrome Android Full support 36Edge Mobile ? Firefox Android Full support 48Opera Android Full support 23Safari iOS ? Samsung Internet Android ?
attachShadowChrome Full support 53Edge No support No
Notes
No support No
Notes
Notes Under consideration
Firefox Full support 63
Full support 63
No support 59 — 65
Disabled
Disabled From version 59 until version 65 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support 40Safari Full support 10WebView Android Full support 53Chrome Android Full support 53Edge Mobile No support No
Notes
No support No
Notes
Notes Under consideration
Firefox Android Full support 63
Full support 63
No support 59 — 65
Disabled
Disabled From version 59 until version 65 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android Full support 40Safari iOS Full support 10Samsung Internet Android ?
attributesChrome Full support 26Edge Full support 16Firefox Full support 22IE ? Opera ? Safari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android Full support 22Opera Android ? Safari iOS ? Samsung Internet Android ?
classListChrome Full support 8Edge Full support 16
Full support 16
Partial support 12
Notes
Notes Not supported for SVG elements.
Firefox Full support 3.6IE Full support 10Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support 12Firefox Android Full support YesOpera Android ? Safari iOS Full support 5Samsung Internet Android ?
classNameChrome Full support 43Edge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Edge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
clientHeightChrome Full support 43Edge Full support YesFirefox Full support YesIE Full support 6Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Edge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
clientLeftChrome Full support 43Edge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Edge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
clientTopChrome Full support 43Edge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Edge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
clientWidthChrome Full support 43Edge Full support YesFirefox Full support YesIE Full support 6Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Edge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
closestChrome Full support 41Edge Full support 15Firefox Full support 35IE No support NoOpera Full support 28Safari Full support 6WebView Android Full support 41Chrome Android Full support 41Edge Mobile ? Firefox Android Full support 35Opera Android ? Safari iOS Full support 9Samsung Internet Android ?
computedStyleMap
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
createShadowRoot
DeprecatedNon-standard
Chrome Full support 35
Notes
Full support 35
Notes
Notes In Chrome 45, the ability to have multiple shadow roots was deprecated.
No support 25 — ?
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge No support NoFirefox No support 59 — 61
Disabled
No support 59 — 61
Disabled
Disabled From version 59 until version 61 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No support 29 — 59
Disabled
Disabled From version 29 until version 59 (exclusive): this feature is behind the dom.webcomponents.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support 22
Notes
Full support 22
Notes
Notes In Opera 32, the ability to have multiple shadow roots was deprecated.
No support 15 — ?
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Safari No support NoWebView Android Full support 37
Notes
Full support 37
Notes
Notes In version 45, the ability to have multiple shadow roots was deprecated.
No support ? — ?
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Chrome Android Full support 35
Notes
Full support 35
Notes
Notes In Chrome 45, the ability to have multiple shadow roots was deprecated.
No support 25 — ?
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Mobile No support NoFirefox Android No support 59 — 61
Disabled
No support 59 — 61
Disabled
Disabled From version 59 until version 61 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No support 29 — 59
Disabled
Disabled From version 29 until version 59 (exclusive): this feature is behind the dom.webcomponents.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android Full support 22
Notes
Full support 22
Notes
Notes In Opera 32, the ability to have multiple shadow roots was deprecated.
No support 14 — ?
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Safari iOS No support NoSamsung Internet Android Full support 5.0
Full support 5.0
No support 4.0 — ?
Prefixed
Prefixed Implemented with the vendor prefix: webkit
currentStyle
Non-standard
Chrome No support NoEdge No support NoFirefox No support NoIE Full support 6Opera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
getAttributeChrome Full support 29Edge Full support YesFirefox Full support 23IE Full support YesOpera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android Full support 23Opera Android ? Safari iOS ? Samsung Internet Android ?
getAttributeNSChrome Full support YesEdge Full support YesFirefox Full support Yes
Notes
Full support Yes
Notes
Notes Starting in Firefox 13, null is always returned instead of the empty string, as per the DOM4 specification. Previously, there were cases in which an empty string could be returned.
IE Full support YesOpera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
getAttributeNamesChrome Full support 61Edge Full support 18Firefox Full support 45IE No support NoOpera Full support 48Safari Full support 10WebView Android Full support 61Chrome Android Full support 61Edge Mobile ? Firefox Android Full support 45Opera Android Full support 48Safari iOS ? Samsung Internet Android ?
getAttributeNodeChrome Full support YesEdge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
getAttributeNodeNSChrome Full support YesEdge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
getBoundingClientRectChrome Full support YesEdge Full support YesFirefox Full support 3IE Full support 4Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support 4
Notes
Full support 4
Notes
Notes Safari for iOS will modify the effective viewport based on the user zoom. This results in incorrect values whenever the user has zoomed.
Samsung Internet Android ?
getClientRectsChrome Full support YesEdge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
getElementsByClassNameChrome Full support YesEdge Full support 16Firefox Full support Yes
Notes
Full support Yes
Notes
Notes Prior to Firefox 19, this method was returning a NodeList; it was then changed to reflect the change in the spec.
IE Full support 9Opera Full support YesSafari Full support 6
Notes
Full support 6
Notes
Notes Safari on iOS 8 and OS X 10.10 returns a NodeList.
WebView Android ? Chrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
getElementsByTagNameChrome Full support 1
Notes
Full support 1
Notes
Notes Initially, this method was returning a NodeList; it was then changed to reflect the spec change.
Edge Full support YesFirefox Full support Yes
Notes
Full support Yes
Notes
Notes Prior to Firefox 19, this method was returning a NodeList; it was then changed to reflect the change in the spec.
IE Full support 5.5Opera Full support Yes
Notes
Full support Yes
Notes
Notes Initially, this method was returning a NodeList; it was then changed to reflect the spec change.
Safari Full support 6
Notes
Full support 6
Notes
Notes Initially, this method was returning a NodeList; it was then changed to reflect the spec change.
WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support Yes
Notes
Full support Yes
Notes
Notes Prior to Firefox 19, this method was returning a NodeList; it was then changed to reflect the change in the spec.
Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
getElementsByTagNameNSChrome Full support 1
Notes
Full support 1
Notes
Notes Initially, this method was returning a NodeList; it was then changed to reflect the spec change.
Edge Full support YesFirefox Full support Yes
Notes
Full support Yes
Notes
Notes The behavior of element.getElementsByTagNameNS changed between Firefox 3.5 and Firefox 3.6. In Firefox 3.5 and before, this function would automatically case-fold any queries so that a search for "foo" would match "Foo" or "foo". In Firefox 3.6 and later this function is now case-sensitive so that a query for "foo" will only match "foo" and not "Foo". For more background on this, please see the comment from Henri Sivonen about the change. You can also look at the relevant part of the standard, which states which parts of the API are case-sensitive and which parts aren't.
Notes Prior to Firefox 19, this method was returning a NodeList; it was then changed to reflects the spec change.
IE Full support 5.5Opera Full support Yes
Notes
Full support Yes
Notes
Notes Initially, this method was returning a NodeList; it was then changed to reflect the spec change.
Safari Full support 6
Notes
Full support 6
Notes
Notes Initially, this method was returning a NodeList; it was then changed to reflect the spec change.
WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support Yes
Notes
Full support Yes
Notes
Notes The behavior of element.getElementsByTagNameNS changed between Firefox 3.5 and Firefox 3.6. In Firefox 3.5 and before, this function would automatically case-fold any queries so that a search for "foo" would match "Foo" or "foo". In Firefox 3.6 and later this function is now case-sensitive so that a query for "foo" will only match "foo" and not "Foo". For more background on this, please see the comment from Henri Sivonen about the change. You can also look at the relevant part of the standard, which states which parts of the API are case-sensitive and which parts aren't.
Notes Prior to Firefox 19, this method was returning a NodeList; it was then changed to reflects the spec change.
Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
hasAttributeChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
hasAttributeNSChrome Full support YesEdge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
hasAttributesChrome Full support YesEdge Full support 16Firefox Full support Yes
Notes
Full support Yes
Notes
Notes [1] Before Firefox 35, it was implemented on the Node interface.
IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
hasPointerCaptureChrome Full support 55Edge ? Firefox Full support 59
Full support 59
Full support 41
Disabled
Disabled From version 41: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE ? Opera Full support 42Safari No support NoWebView Android Full support 55Chrome Android Full support 55Edge Mobile ? Firefox Android No support No
No support No
Full support 41
Disabled
Disabled From version 41: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android Full support 42Safari iOS No support NoSamsung Internet Android ?
idChrome Full support 42Edge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support 6WebView Android Full support 42Chrome Android Full support 42Edge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
innerHTMLChrome Full support 33
Notes
Full support 33
Notes
Notes This API was previously available on the Node API.
Edge Full support 14Firefox Full support 1IE Full support 4Opera Full support 7Safari Full support 9WebView Android Full support Yes
Notes
Full support Yes
Notes
Notes This API was previously available on the Node API.
Chrome Android Full support 33
Notes
Full support 33
Notes
Notes This API was previously available on the Node API.
Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support 1Samsung Internet Android Full support 1.0
insertAdjacentElementChrome Full support 1Edge Full support 17Firefox Full support 48IE Full support YesOpera Full support YesSafari Full support 10WebView Android Full support 2.3Chrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 48Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
insertAdjacentHTMLChrome Full support 1Edge Full support 17Firefox Full support 8IE Full support 4
Notes
Full support 4
Notes
Notes Before Internet Explorer 10, throws an "Invalid target element for this operation." error when called on a <table>, <tbody>, <thead>, or <tr> element.
Opera Full support 7Safari Full support 10WebView Android Full support 2.3Chrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 8Opera Android Full support YesSafari iOS Full support 4Samsung Internet Android Full support Yes
insertAdjacentTextChrome Full support 1Edge Full support 17Firefox Full support 48IE Full support YesOpera Full support YesSafari Full support 10WebView Android Full support 2.3Chrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 48Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
localNameChrome Full support 31
Notes
Full support 31
Notes
Notes This API was previously available on the Node API.
Edge Full support 17Firefox Full support 48
Notes
Full support 48
Notes
Notes This API was previously available on the Node API.
IE ? Opera Full support YesSafari Full support 10WebView Android Full support Yes
Notes
Full support Yes
Notes
Notes This API was previously available on the Node API.
Chrome Android Full support 31
Notes
Full support 31
Notes
Notes This API was previously available on the Node API.
Edge Mobile ? Firefox Android Full support 48
Notes
Full support 48
Notes
Notes This API was previously available on the Node API.
Opera Android ? Safari iOS ? Samsung Internet Android ?
matchesChrome Full support 34
Full support 34
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
Edge Full support Yes
Full support Yes
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: msMatchesSelector
Firefox Full support 34
Full support 34
Full support 44
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
Full support 3.6
Notes Alternate Name
Notes Prior to Firefox 4, invalid selector strings caused false to be returned instead of throwing an exception.
Notes See bug 1119718 for removal.
Alternate Name Uses the non-standard name: mozMatchesSelector
IE Full support 9
Alternate Name
Full support 9
Alternate Name
Alternate Name Uses the non-standard name: msMatchesSelector
Opera Full support 21
Full support 21
Full support 15
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
No support 11.5 — 15
Alternate Name
Alternate Name Uses the non-standard name: oMatchesSelector
Safari Full support 7
Full support 7
Full support 5
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
WebView Android Full support Yes
Full support Yes
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
Chrome Android Full support 34
Full support 34
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
Edge Mobile Full support Yes
Full support Yes
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: msMatchesSelector
Firefox Android Full support 34
Full support 34
Full support 44
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
Full support 4
Notes Alternate Name
Notes See bug 1119718 for removal.
Alternate Name Uses the non-standard name: mozMatchesSelector
Opera Android Full support 21
Full support 21
Full support 15
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
No support 11.5 — 15
Alternate Name
Alternate Name Uses the non-standard name: oMatchesSelector
Safari iOS Full support 8
Full support 8
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
Samsung Internet Android Full support Yes
Full support Yes
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: webkitMatchesSelector
nameChrome No support NoEdge ? Firefox ? IE ? Opera No support NoSafari ? WebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android ?
namespaceURIChrome Full support 31
Notes
Full support 31
Notes
Notes This API was previously available on the Node API.
Edge Full support 17Firefox Full support 48
Notes
Full support 48
Notes
Notes This API was previously available on the Node API.
IE ? Opera Full support Yes
Notes
Full support Yes
Notes
Notes This API was previously available on the Node API.
Safari Full support 10WebView Android Full support Yes
Notes
Full support Yes
Notes
Notes This API was previously available on the Node API.
Chrome Android Full support 31
Notes
Full support 31
Notes
Notes This API was previously available on the Node API.
Edge Mobile ? Firefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android ?
openOrClosedShadowRoot
Non-standard
Chrome No support NoEdge No support NoFirefox Full support 63
Notes
Full support 63
Notes
Notes Available only to WebExtensions.
IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android Full support 63
Notes
Full support 63
Notes
Notes Available only to WebExtensions.
Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
onfullscreenchangeChrome Full support 57Edge ? Firefox Full support 64IE ? Opera ? Safari ? WebView Android Full support 57Chrome Android Full support 57Edge Mobile ? Firefox Android Full support 64Opera Android ? Safari iOS ? Samsung Internet Android ?
onfullscreenerrorChrome Full support 57Edge ? Firefox Full support 64IE ? Opera ? Safari ? WebView Android Full support 57Chrome Android Full support 57Edge Mobile ? Firefox Android Full support 64Opera Android ? Safari iOS ? Samsung Internet Android ?
outerHTMLChrome Full support 33
Notes
Full support 33
Notes
Notes This API was previously available on the Node API.
Edge Full support 14Firefox Full support 11IE Full support 4Opera Full support 7Safari Full support 9WebView Android Full support Yes
Notes
Full support Yes
Notes
Notes This API was previously available on the Node API.
Chrome Android Full support 33
Notes
Full support 33
Notes
Notes This API was previously available on the Node API.
Edge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
prefixChrome Full support 31
Notes
Full support 31
Notes
Notes This API was previously available on the Node API.
Edge Full support YesFirefox Full support 48
Notes
Full support 48
Notes
Notes This API was previously available on the Node API.
IE ? Opera Full support YesSafari Full support 10WebView Android Full support YesChrome Android Full support 31
Notes
Full support 31
Notes
Notes This API was previously available on the Node API.
Edge Mobile Full support YesFirefox Android Full support 48
Notes
Full support 48
Notes
Notes This API was previously available on the Node API.
Opera Android ? Safari iOS ? Samsung Internet Android ?
querySelectorChrome Full support 1Edge Full support 12Firefox Full support 3.5IE Full support 9
Full support 9
Partial support 8
Notes
Notes querySelector() is supported, but only for CSS 2.1 selectors.
Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
querySelectorAllChrome Full support 1Edge Full support YesFirefox Full support 3.5IE Full support 9
Full support 9
Partial support 8
Notes
Notes querySelectorAll() is supported, but only for CSS 2.1 selectors.
Opera Full support 10Safari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android ? Safari iOS Full support YesSamsung Internet Android Full support Yes
releasePointerCaptureChrome Full support 55Edge Full support YesFirefox Full support 59
Full support 59
Full support 41
Disabled
Disabled From version 41: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE Full support 11
Full support 11
Full support 10
Prefixed
Prefixed Implemented with the vendor prefix: ms
Opera Full support 42Safari No support NoWebView Android Full support 55Chrome Android Full support 55Edge Mobile ? Firefox Android No support No
No support No
Full support 41
Disabled
Disabled From version 41: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android Full support 42Safari iOS No support NoSamsung Internet Android ?
removeAttributeChrome Full support YesEdge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
removeAttributeNSChrome Full support YesEdge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
removeAttributeNodeChrome Full support YesEdge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
requestFullscreenChrome Full support 15
Prefixed
Full support 15
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge No support ? — 14
Prefixed
No support ? — 14
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Firefox Full support 64
Full support 64
Full support 47
Disabled
Disabled From version 47: this feature is behind the full-screen-api.unprefix.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Full support 9
Notes Alternate Name
Notes Before Firefox 44, Firefox incorrectly allowed elements inside a <frame> or an <object> to request, and to be granted, fullscreen. In Firefox 44 and onwards this has been fixed: only elements in the top-level document or in an <iframe> with the allowfullscreen attribute can be displayed fullscreen.
Alternate Name Uses the non-standard name: mozRequestFullScreen
IE Full support 11
Prefixed
Full support 11
Prefixed
Prefixed Implemented with the vendor prefix: ms
Opera Full support 15
Prefixed
Full support 15
Prefixed
Prefixed Implemented with the vendor prefix: webkit
No support 12 — 15
Prefixed
Prefixed Implemented with the vendor prefix: o
Safari Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
WebView Android Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Chrome Android Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Mobile Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Firefox Android Full support 64
Full support 64
Full support 47
Disabled
Disabled From version 47: this feature is behind the full-screen-api.unprefix.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Full support 9
Notes Alternate Name
Notes Before Firefox 44, Firefox incorrectly allowed elements inside a <frame> or an <object> to request, and to be granted, fullscreen. In Firefox 44 and onwards this has been fixed: only elements in the top-level document or in an <iframe> with the allowfullscreen attribute can be displayed fullscreen.
Alternate Name Uses the non-standard name: mozRequestFullScreen
Opera Android Full support 14
Prefixed
Full support 14
Prefixed
Prefixed Implemented with the vendor prefix: webkit
No support 12 — 14
Prefixed
Prefixed Implemented with the vendor prefix: o
Safari iOS Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Samsung Internet Android Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
requestPointerLockChrome Full support Yes
Full support Yes
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Full support YesFirefox Full support 50
Full support 50
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: moz
IE ? Opera ? Safari Full support 10WebView Android Full support Yes
Full support Yes
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Chrome Android Full support Yes
Full support Yes
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Mobile Full support YesFirefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
runtimeStyle
Non-standard
Chrome No support NoEdge No support NoFirefox No support NoIE Full support 6Opera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
scrollChrome Full support 45Edge No support NoFirefox Full support YesIE No support NoOpera Full support 32Safari Full support 10WebView Android Full support 45Chrome Android Full support 45Edge Mobile No support NoFirefox Android Full support YesOpera Android Full support 32Safari iOS No support NoSamsung Internet Android Full support Yes
scrollByChrome Full support 45Edge No support NoFirefox Full support YesIE No support NoOpera Full support 32Safari Full support 10WebView Android Full support 45Chrome Android Full support 45Edge Mobile No support NoFirefox Android Full support YesOpera Android Full support 32Safari iOS No support NoSamsung Internet Android Full support Yes
scrollIntoView
Experimental
Chrome Full support 29Edge Full support 17
Notes
Full support 17
Notes
Notes No support for smooth behavior.
Firefox Full support 1IE Full support 8
Notes
Full support 8
Notes
Notes No support for smooth behavior or center options.
Opera Full support 38Safari Full support 6
Notes
Full support 6
Notes
Notes No support for smooth behavior or center options.
WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support 5
Notes
Full support 5
Notes
Notes No support for smooth behavior or center options.
Samsung Internet Android ?
scrollIntoViewIfNeeded
Non-standard
Chrome Full support YesEdge No support NoFirefox No support NoIE No support NoOpera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile No support NoFirefox Android No support NoOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
scrollHeightChrome Full support 4Edge Full support YesFirefox Full support 21
Full support 21
No support 3 — 21
Notes
Notes In Firefox versions prior to 21, when an element's content does not generate a vertical scrollbar, then its scrollHeight property is equal to its clientHeight property. This can mean either the content is too short to require a scrollbar or that the element has a CSS style overflow value of visible (non-scrollable).
IE Full support 8Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support 4Samsung Internet Android Full support Yes
scrollLeftChrome Full support 43Edge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Edge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
scrollLeftMax
Non-standard
Chrome No support NoEdge No support NoFirefox Full support 16IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android Full support 16Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
scrollToChrome Full support 45Edge No support NoFirefox Full support YesIE No support NoOpera Full support 32Safari Full support 10WebView Android Full support 45Chrome Android Full support 45Edge Mobile No support NoFirefox Android Full support YesOpera Android Full support 32Safari iOS No support NoSamsung Internet Android Full support Yes
scrollTopChrome Full support 43Edge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support 43Edge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
scrollTopMax
Non-standard
Chrome No support NoEdge No support NoFirefox Full support 16IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android Full support 16Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
scrollWidthChrome Full support 43Edge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support 43Edge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
setAttributeChrome Full support YesEdge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
setAttributeNSChrome Full support YesEdge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
setAttributeNodeChrome Full support YesEdge Full support YesFirefox Full support YesIE ? Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
setAttributeNodeNSChrome Full support YesEdge Full support Yes
Notes
Full support Yes
Notes
Notes Returns a ClientRectList with ClientRect objects (which do not contain x and y properties) instead of DOMRect objects.
Firefox Full support YesIE Full support Yes
Notes
Full support Yes
Notes
Notes Returns a ClientRectList with ClientRect objects (which do not contain x and y properties) instead of DOMRect objects.
Opera ? Safari Full support 6WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
setCapture
Non-standard
Chrome No support NoEdge ? Firefox Full support YesIE ? Opera No support NoSafari ? WebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android ?
setPointerCaptureChrome Full support 55Edge Full support YesFirefox Full support 59
Full support 59
Full support 41
Disabled
Disabled From version 41: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE Full support 11
Full support 11
Full support 10
Prefixed
Prefixed Implemented with the vendor prefix: ms
Opera Full support 42Safari No support NoWebView Android Full support 55Chrome Android Full support 55Edge Mobile ? Firefox Android No support No
No support No
Full support 41
Disabled
Disabled From version 41: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android Full support 42Safari iOS No support NoSamsung Internet Android ?
shadowRootChrome Full support 43Edge No support No
Notes
No support No
Notes
Notes Under consideration
Firefox Full support 63
Full support 63
No support 59 — 65
Disabled
Disabled From version 59 until version 65 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support 40Safari Full support 10WebView Android Full support 43Chrome Android Full support 43Edge Mobile No support No
Notes
No support No
Notes
Notes Under consideration
Firefox Android Full support 63
Full support 63
No support 59 — 65
Disabled
Disabled From version 59 until version 65 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android Full support 40Safari iOS Full support YesSamsung Internet Android ?
slotChrome Full support 53Edge ? Firefox ? IE ? Opera ? Safari Full support 10WebView Android Full support 53Chrome Android Full support 53Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
tabStop
DeprecatedNon-standard
Chrome Full support 43Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android Full support 43Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
tagNameChrome Full support 43Edge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Edge Mobile Full support YesFirefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android ?
toggleAttributeChrome Full support 69Edge Full support 18Firefox Full support 63IE ? Opera Full support 56Safari ? WebView Android Full support 69Chrome Android Full support 69Edge Mobile ? Firefox Android Full support 63Opera Android Full support 56Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.
See implementation notes.
See implementation notes.
User must explicitly enable this feature.
User must explicitly enable this feature.
Uses a non-standard name.
Uses a non-standard name.
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

Etiquetas do documento e contribuidores

Contribuidores para esta página: mansil, MauroBonucci, khalid32, Leandro Mercês Xavier, Davis.peixoto, Codigo13
Última atualização por: mansil,