이 번역은 완료되지 않았습니다. 이 문서를 번역해 주세요.
Element는 Document 안의 모든 객체가 상속하는 제일 범용적인 기반 클래스로 공통 메서드와 속성만 가지고 있으며, 특정 요소를 더 상세하게 표현하는 클래스가 Element를 상속합니다. 예를 들어 HTMLElement 인터페이스는 HTML 요소의 기반 인터페이스이고 SVGElement 인터페이스는 모든 SVG 요소의 기초입니다.
XUL의 XULElement처럼 웹 플랫폼 밖에서도 Element를 구현합니다.
<div id="interfaceDiagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveAspectRatio="xMinYMin meet"><a xlink:href="https://developer.mozilla.org/ko/docs/Web/API/EventTarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#D4DDE4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">EventTarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#D4DDE4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#D4DDE4"/><a xlink:href="https://developer.mozilla.org/ko/docs/Web/API/Node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#D4DDE4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">Node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#D4DDE4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#D4DDE4"/><a xlink:href="https://developer.mozilla.org/ko/docs/Web/API/Element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">Element</text></a></svg></div>
a:hover text { fill: #0095DD; pointer-events: all;}
속성
부모 인터페이스인 Node와 그 부모인 EventTarget의 속성을 상속합니다. ParentNode, ChildNode, NonDocumentTypeChildNode와 Animatable의 속성을 구현합니다.
Element.attributesRead only- Returns a
NamedNodeMapobject containing the assigned attributes of the corresponding HTML element. Element.classListRead only- Returns a
DOMTokenListcontaining the list of class attributes. Element.className- Is a
DOMStringrepresenting the class of the element. Element.clientHeightRead only- Returns a
Numberrepresenting the inner height of the element. Element.clientLeftRead only- Returns a
Numberrepresenting the width of the left border of the element. Element.clientTopRead only- Returns a
Numberrepresenting the width of the top border of the element. Element.clientWidthRead only- Returns a
Numberrepresenting the inner width of the element. Element.computedNameRead only- Returns a
DOMStringcontaining the label exposed to accessibility. Element.computedRoleRead only- Returns a
DOMStringcontaining the ARIA role that has been applied to a particular element. Element.id- Is a
DOMStringrepresenting the id of the element. Element.innerHTML- Is a
DOMStringrepresenting the markup of the element's content. Element.localNameRead only- A
DOMStringrepresenting the local part of the qualified name of the element. Element.namespaceURIRead only- The namespace URI of the element, or
nullif it is no namespace.참고: Firefox 3.5 이하에서는 HTML 요소가 네임스페이스에 속해있지 않습니다. 이후 버전에서는 HTML과 XML 트리 모두에서
http://www.w3.org/1999/xhtml네임스페이스를 사용합니다. NonDocumentTypeChildNode.nextElementSiblingRead only- Is an
Element, the element immediately following the given one in the tree, ornullif there's no sibling node. Element.outerHTML- Is a
DOMStringrepresenting the markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string. Element.prefixRead only- A
DOMStringrepresenting the namespace prefix of the element, ornullif no prefix is specified. NonDocumentTypeChildNode.previousElementSiblingRead only- Is a
Element, the element immediately preceding the given one in the tree, ornullif there is no sibling element. Element.scrollHeightRead only- Returns a
Numberrepresenting the scroll view height of an element. Element.scrollLeft- Is a
Numberrepresenting the left scroll offset of the element. Element.scrollLeftMaxRead only- Returns a
Numberrepresenting the maximum left scroll offset possible for the element. Element.scrollTop- A
Numberrepresenting number of pixels the top of the document is scrolled vertically. Element.scrollTopMaxRead only- Returns a
Numberrepresenting the maximum top scroll offset possible for the element. Element.scrollWidthRead only- Returns a
Numberrepresenting the scroll view width of the element. Element.shadowRootRead only- Returns the open shadow root that is hosted by the element, or null if no open shadow root is present.
Element.openOrClosedShadowRootRead only- Returns the shadow root that is hosted by the element, regardless if its open or closed. Available only to WebExtensions.
Element.slot- Returns the name of the shadow DOM slot the element is inserted in.
Element.tabStop- Is a
Booleanindicating if the element can receive input focus via the tab key. Element.tagNameRead only- Returns a
Stringwith the name of the tag for the given element. Element.undoManagerRead only- Returns the
UndoManagerassociated with the element. Element.undoScope- Is a
Booleanindicating if the element is an undo scope host, or not.
Note: DOM Level 3 명세는 namespaceURI, localName, prefix를 Node에 정의했고, DOM4에서 Element로 옮겨졌습니다.
이 변경점은 Chrome 46.0과 Firefox 48.0부터 구현됐습니다.
Slotable 속성
Element 인터페이스는 Slotable 믹스인에 정의된 다음 속성을 가집니다.
Slotable.assignedSlotRead only- Returns a
HTMLSlotElementrepresenting the<slot>the node is inserted in.
이벤트 핸들러
Element.ongotpointercapture- Returns the event handler for the
gotpointercaptureevent type. Element.onlostpointercapture- Returns the event handler for the
lostpointercaptureevent type.
메서드
부모 인터페이스인 Node와 그 부모인 EventTarget의 메서드를 상속합니다. ParentNode, ChildNode, NonDocumentTypeChildNode와 Animatable의 메서드를 구현합니다.
EventTarget.addEventListener()- Registers an event handler to a specific event type on the element.
Element.attachShadow()- Attatches a shadow DOM tree to the specified element and returns a reference to its
ShadowRoot. Element.animate()- A shortcut method to create and run an animation on an element. Returns the created Animation object instance.
Element.closest()- Returns the
Elementwhich is the closest ancestor of the current element (or the current element itself) which matches the selectors given in parameter. Element.createShadowRoot()- Creates a shadow DOM on on the element, turning it into a shadow host. Returns a
ShadowRoot. Element.computedStyleMap()- Returns a
StylePropertyMapReadOnlyinterface which provides a read-only representation of a CSS declaration block that is an alternative toCSSStyleDeclaration. EventTarget.dispatchEvent()- Dispatches an event to this node in the DOM and returns a
Booleanthat indicates whether no handler canceled the event. Element.getAnimations()- Returns an array of Animation objects currently active on the element.
Element.getAttribute()- Retrieves the value of the named attribute from the current node and returns it as an
Object. Element.getAttributeNames()- Returns an array of attribute names from the current element.
Element.getAttributeNS()- Retrieves the value of the attribute with the specified name and namespace, from the current node and returns it as an
Object. Element.getAttributeNode()- Retrieves the node representation of the named attribute from the current node and returns it as an
Attr. Element.getAttributeNodeNS()- Retrieves the node representation of the attribute with the specified name and namespace, from the current node and returns it as an
Attr. Element.getBoundingClientRect()- Returns the size of an element and its position relative to the viewport.
Element.getClientRects()- Returns a collection of rectangles that indicate the bounding rectangles for each line of text in a client.
Element.getElementsByClassName()- Returns a live
HTMLCollectionthat contains all descendants of the current element that possess the list of classes given in the parameter. Element.getElementsByTagName()- Returns a live
HTMLCollectioncontaining all descendant elements, of a particular tag name, from the current element. Element.getElementsByTagNameNS()- Returns a live
HTMLCollectioncontaining all descendant elements, of a particular tag name and namespace, from the current element. Element.hasAttribute()- Returns a
Booleanindicating if the element has the specified attribute or not. Element.hasAttributeNS()- Returns a
Booleanindicating if the element has the specified attribute, in the specified namespace, or not. Element.hasAttributes()- Returns a
Booleanindicating if the element has one or more HTML attributes present. Element.insertAdjacentElement()- Inserts a given element node at a given position relative to the element it is invoked upon.
Element.insertAdjacentHTML()- Parses the text as HTML or XML and inserts the resulting nodes into the tree in the position given.
Element.insertAdjacentText()- Inserts a given text node at a given position relative to the element it is invoked upon.
Element.matches()- Returns a
Booleanindicating whether or not the element would be selected by the specified selector string. Element.querySelector()- Returns the first
Nodewhich matches the specified selector string relative to the element. Element.querySelectorAll()- Returns a
NodeListof nodes which match the specified selector string relative to the element. Element.releasePointerCapture()- Releases (stops) pointer capture that was previously set for a specific
pointer event. ChildNode.remove()- Removes the element from the children list of its parent.
Element.removeAttribute()- Removes the named attribute from the current node.
Element.removeAttributeNS()- Removes the attribute with the specified name and namespace, from the current node.
Element.removeAttributeNode()- Removes the node representation of the named attribute from the current node.
EventTarget.removeEventListener()- Removes an event listener from the element.
Element.requestFullscreen()- Asynchronously asks the browser to make the element full-screen.
Element.requestPointerLock()- Allows to asynchronously ask for the pointer to be locked on the given element.
Element.scrollIntoView()- Scrolls the page until the element gets into the view.
Element.setAttribute()- Sets the value of a named attribute of the current node.
Element.setAttributeNS()- Sets the value of the attribute with the specified name and namespace, from the current node.
Element.setAttributeNode()- Sets the node representation of the named attribute from the current node.
Element.setAttributeNodeNS()- Sets the node representation of the attribute with the specified name and namespace, from the current node.
Element.setCapture()- Sets up mouse event capture, redirecting all mouse events to this element.
Element.setPointerCapture()- Designates a specific element as the capture target of future pointer events.
Element.toggleAttribute()- Toggles a boolean attribute, removing it if it is present and adding it if it is not present, on the specified element.
명세
| Specification | Status | Comment |
|---|---|---|
| Web Animations | Working Draft | Added the getAnimationPlayers() method. |
| UndoManager and DOMTransaction The definition of 'Element' in that specification. |
Editor's Draft | Added the undoScope and undoManager properties. |
| Pointer Events The definition of 'Element' in that specification. |
Recommendation | Added the following event handlers: ongotpointercapture and onlostpointercapture.Added the following methods: setPointerCapture() and releasePointerCapture(). |
| Selectors API Level 2 The definition of 'Element' in that specification. |
Obsolete | Added the following methods: matches() (implemented as mozMatchesSelector()), find(), findAll(). |
| Selectors API Level 1 The definition of 'Element' in that specification. |
Obsolete | Added the following methods: querySelector() and querySelectorAll(). |
| Pointer Lock The definition of 'Element' in that specification. |
Candidate Recommendation | Added the requestPointerLock() method. |
| Fullscreen API The definition of 'Element' in that specification. |
Living Standard | Added the requestFullscreen() method. |
| DOM Parsing and Serialization The definition of 'Element' in that specification. |
Working Draft | Added the following properties: innerHTML, and outerHTML.Added the following method: insertAdjacentHTML(). |
| CSS Object Model (CSSOM) View Module The definition of 'Element' in that specification. |
Working Draft | Added the following properties: scrollTop, scrollLeft, scrollWidth, scrollHeight, clientTop, clientLeft, clientWidth, and clientHeight.Added the following methods: getClientRects(), getBoundingClientRect(), and scrollIntoView(). |
| Element Traversal Specification The definition of 'Element' in that specification. |
Obsolete | Added inheritance of the ElementTraversal interface. |
| DOM The definition of 'Element' in that specification. |
Living Standard | Removed the following methods: closest(), setIdAttribute(), setIdAttributeNS(), and setIdAttributeNode().Removed the schemaTypeInfo property.Modified the return value of getElementsByTag() and getElementsByTagNS().Moved hasAttributes() form the Node interface to this one. |
| Document Object Model (DOM) Level 3 Core Specification The definition of 'Element' in that specification. |
Obsolete | Added the following methods: setIdAttribute(), setIdAttributeNS(), and setIdAttributeNode(). These methods were never implemented and have been removed in later specifications.Added the schemaTypeInfo property. This property was never implemented and has been removed in later specifications. |
| Document Object Model (DOM) Level 2 Core Specification The definition of 'Element' in that specification. |
Obsolete | The normalize() method has been moved to Node. |
| Document Object Model (DOM) Level 1 Specification The definition of 'Element' in that specification. |
Obsolete | Initial definition. |
브라우저 호환성
| Desktop | Mobile | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Element | Chrome Full support 1 | Edge Full support Yes | Firefox Full support 1 | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support 18 | Edge Mobile Full support Yes | Firefox Android Full support 4 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
accessKey | Chrome
No support
No
| Edge ? | Firefox ? | IE ? | Opera
No support
No
| Safari ? | WebView Android
No support
No
| Chrome Android
No support
No
| Edge Mobile ? | Firefox Android ? | Opera Android
No support
No
| Safari iOS ? | Samsung Internet Android ? |
animate | Chrome Full support 36 | Edge No support No | Firefox Full support 48 | IE No support No | Opera Full support 23 | Safari No support No | WebView Android Full support 37 | Chrome Android Full support 36 | Edge Mobile ? | Firefox Android Full support 48 | Opera Android Full support 23 | Safari iOS ? | Samsung Internet Android ? |
attachShadow | Chrome Full support 53 | Edge
No support
No
| Firefox
Full support
63
| IE No support No | Opera Full support 40 | Safari Full support 10 | WebView Android Full support 53 | Chrome Android Full support 53 | Edge Mobile
No support
No
| Firefox Android
Full support
63
| Opera Android Full support 40 | Safari iOS Full support 10 | Samsung Internet Android ? |
attributes | Chrome Full support 26 | Edge Full support 16 | Firefox Full support 22 | IE ? | Opera ? | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android Full support 22 | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
attributeStyleMap | Chrome Full support 66 | Edge ? | Firefox ? | IE ? | Opera ? | Safari ? | WebView Android Full support 66 | Chrome Android Full support 66 | Edge Mobile ? | Firefox Android ? | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
auxclick event | Chrome Full support 55 | Edge ? | Firefox Full support 53 | IE No support No | Opera Full support 42 | Safari No support No | WebView Android Full support 55 | Chrome Android Full support 55 | Edge Mobile ? | Firefox Android Full support 53 | Opera Android Full support 42 | Safari iOS No support No | Samsung Internet Android ? |
blur event | Chrome Full support 5 | Edge Full support Yes | Firefox
Full support
Yes
| IE Full support Yes | Opera Full support 12.1 | Safari Full support 5.1 | WebView Android Full support Yes | Chrome Android Full support 18 | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support 12.1 | Safari iOS Full support 5.1 | Samsung Internet Android Full support Yes |
classList | Chrome Full support 8 | Edge
Full support
16
| Firefox Full support 3.6 | IE Full support 10 | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support 12 | Firefox Android Full support Yes | Opera Android ? | Safari iOS Full support 5 | Samsung Internet Android ? |
className | Chrome Full support 43 | Edge Full support 13 | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support 6 | WebView Android Full support 43 | Chrome Android Full support 43 | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
click event | Chrome Full support Yes | Edge Full support Yes | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android ? |
clientHeight | Chrome Full support 43 | Edge Full support 12 | Firefox Full support Yes | IE Full support 6 | Opera Full support Yes | Safari Full support 6 | WebView Android Full support 43 | Chrome Android Full support 43 | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
clientLeft | Chrome Full support 43 | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support 43 | Chrome Android Full support 43 | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
clientTop | Chrome Full support 43 | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support 43 | Chrome Android Full support 43 | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
clientWidth | Chrome Full support 43 | Edge Full support 12 | Firefox Full support Yes | IE Full support 6 | Opera Full support Yes | Safari Full support 6 | WebView Android Full support 43 | Chrome Android Full support 43 | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
closest | Chrome Full support 41 | Edge Full support 15 | Firefox Full support 35 | IE No support No | Opera Full support 28 | Safari Full support 6 | WebView Android Full support 41 | Chrome Android Full support 41 | Edge Mobile ? | Firefox Android Full support 35 | Opera Android ? | Safari iOS Full support 9 | Samsung Internet Android ? |
compositionend event | Chrome Full support Yes | Edge Full support Yes | Firefox Full support 9 | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android Full support Yes | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
compositionstart event | Chrome Full support Yes | Edge Full support Yes | Firefox Full support 9 | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android Full support Yes | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
compositionupdate event | Chrome Full support Yes | Edge Full support Yes | Firefox Full support 9 | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android Full support Yes | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
computedStyleMap | Chrome Full support 66 | Edge No support No | Firefox No support No | IE No support No | Opera Full support 53 | Safari No support No | WebView Android Full support 66 | Chrome Android Full support 66 | Edge Mobile No support No | Firefox Android No support No | Opera Android Full support 53 | Safari iOS No support No | Samsung Internet Android ? |
copy event | Chrome Full support 58 | Edge Full support Yes | Firefox Full support Yes | IE No support No | Opera Full support 45 | Safari Full support Yes | WebView Android Full support 58 | Chrome Android Full support 58 | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support 45 | Safari iOS ? | Samsung Internet Android ? |
createShadowRoot | Chrome
Full support
35
| Edge No support No | Firefox
No support
59 — 61
| IE No support No | Opera
Full support
22
| Safari No support No | WebView Android
Full support
37
| Chrome Android
Full support
35
| Edge Mobile No support No | Firefox Android
No support
59 — 61
| Opera Android
Full support
22
| Safari iOS No support No | Samsung Internet Android
Full support
5.0
|
currentStyle | Chrome No support No | Edge No support No | Firefox No support No | IE Full support 6 | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Edge Mobile No support No | Firefox Android No support No | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
cut event | Chrome Full support 58 | Edge Full support Yes | Firefox Full support Yes | IE No support No | Opera Full support 45 | Safari Full support Yes | WebView Android Full support 58 | Chrome Android Full support 58 | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support 45 | Safari iOS ? | Samsung Internet Android ? |
focus event | Chrome Full support Yes | Edge Full support Yes | Firefox
Full support
Yes
| IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
focusin event | Chrome Full support Yes | Edge Full support Yes | Firefox Full support 52 | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support 52 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
focusout event | Chrome Full support Yes | Edge Full support Yes | Firefox Full support 52 | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support 52 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
getAttribute | Chrome Full support 29 | Edge Full support 12 | Firefox Full support 23 | IE Full support Yes | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android Full support 23 | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
getAttributeNS | Chrome Full support Yes | Edge Full support 12 | Firefox
Full support
Yes
| IE Full support Yes | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
getAttributeNames | Chrome Full support 61 | Edge Full support 18 | Firefox Full support 45 | IE No support No | Opera Full support 48 | Safari Full support 10 | WebView Android Full support 61 | Chrome Android Full support 61 | Edge Mobile ? | Firefox Android Full support 45 | Opera Android Full support 48 | Safari iOS ? | Samsung Internet Android ? |
getAttributeNode | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
getAttributeNodeNS | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
getBoundingClientRect | Chrome Full support Yes | Edge Full support 12 | Firefox Full support 3 | IE Full support 4 | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support 4 | Opera Android Full support Yes | Safari iOS
Full support
4
| Samsung Internet Android ? |
getClientRects | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
getElementsByClassName | Chrome Full support Yes | Edge Full support 16 | Firefox
Full support
Yes
| IE Full support 9 | Opera Full support Yes | Safari
Full support
6
| WebView Android ? | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
getElementsByTagName | Chrome
Full support
1
| Edge Full support 12 | Firefox
Full support
Yes
| IE Full support 5.5 | Opera
Full support
Yes
| Safari
Full support
6
| WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android
Full support
Yes
| Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
getElementsByTagNameNS | Chrome
Full support
1
| Edge Full support 12 | Firefox
Full support
Yes
| IE Full support 5.5 | Opera
Full support
Yes
| Safari
Full support
6
| WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android
Full support
Yes
| Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android ? |
hasAttribute | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
hasAttributeNS | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
hasAttributes | Chrome Full support Yes | Edge Full support 16 | Firefox
Full support
Yes
| IE Full support 9 | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
hasPointerCapture | Chrome Full support 55 | Edge ? | Firefox
Full support
59
| IE ? | Opera Full support 42 | Safari No support No | WebView Android Full support 55 | Chrome Android Full support 55 | Edge Mobile ? | Firefox Android
No support
No
| Opera Android Full support 42 | Safari iOS No support No | Samsung Internet Android ? |
id | Chrome Full support 42 | Edge Full support 12 | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support 6 | WebView Android Full support 42 | Chrome Android Full support 42 | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
innerHTML | Chrome
Full support
33
| Edge Full support 14 | Firefox Full support 1 | IE Full support 4 | Opera Full support 7 | Safari Full support 9 | WebView Android
Full support
Yes
| Chrome Android
Full support
33
| Edge Mobile Full support 12 | Firefox Android Full support 4 | Opera Android Full support Yes | Safari iOS Full support 1 | Samsung Internet Android Full support 1.0 |
insertAdjacentElement | Chrome Full support 1 | Edge Full support 17 | Firefox Full support 48 | IE Full support Yes | Opera Full support Yes | Safari Full support 10 | WebView Android Full support 2.3 | Chrome Android Full support 18 | Edge Mobile Full support 12 | Firefox Android Full support 48 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
insertAdjacentHTML | Chrome Full support 1 | Edge Full support 17 | Firefox Full support 8 | IE
Full support
4
| Opera Full support 7 | Safari Full support 10 | WebView Android Full support 2.3 | Chrome Android Full support 18 | Edge Mobile Full support 12 | Firefox Android Full support 8 | Opera Android Full support Yes | Safari iOS Full support 4 | Samsung Internet Android Full support Yes |
insertAdjacentText | Chrome Full support 1 | Edge Full support 17 | Firefox Full support 48 | IE Full support Yes | Opera Full support Yes | Safari Full support 10 | WebView Android Full support 2.3 | Chrome Android Full support 18 | Edge Mobile Full support 12 | Firefox Android Full support 48 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
localName | Chrome
Full support
31
| Edge Full support 17 | Firefox
Full support
48
| IE ? | Opera Full support Yes | Safari Full support 10 | WebView Android
Full support
Yes
| Chrome Android
Full support
31
| Edge Mobile ? | Firefox Android
Full support
48
| Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
matches | Chrome
Full support
34
| Edge
Full support
Yes
| Firefox
Full support
34
| IE
Full support
9
| Opera
Full support
21
| Safari
Full support
7
| WebView Android
Full support
Yes
| Chrome Android
Full support
34
| Edge Mobile
Full support
Yes
| Firefox Android
Full support
34
| Opera Android
Full support
21
| Safari iOS
Full support
8
| Samsung Internet Android
Full support
Yes
|
name | Chrome No support No | Edge ? | Firefox ? | IE ? | Opera No support No | Safari ? | WebView Android No support No | Chrome Android No support No | Edge Mobile ? | Firefox Android ? | Opera Android No support No | Safari iOS ? | Samsung Internet Android ? |
namespaceURI | Chrome
Full support
31
| Edge Full support 17 | Firefox
Full support
48
| IE ? | Opera
Full support
Yes
| Safari Full support 10 | WebView Android
Full support
Yes
| Chrome Android
Full support
31
| Edge Mobile ? | Firefox Android Full support Yes | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
openOrClosedShadowRoot | Chrome No support No | Edge No support No | Firefox
Full support
63
| IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Edge Mobile No support No | Firefox Android
Full support
63
| Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
onfullscreenchange | Chrome Full support 57 | Edge ? | Firefox
Full support
64
| IE ? | Opera ? | Safari ? | WebView Android Full support 57 | Chrome Android Full support 57 | Edge Mobile ? | Firefox Android
Full support
64
| Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
onfullscreenerror | Chrome Full support 57 | Edge ? | Firefox
Full support
64
| IE ? | Opera ? | Safari ? | WebView Android Full support 57 | Chrome Android Full support 57 | Edge Mobile ? | Firefox Android
Full support
64
| Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
outerHTML | Chrome
Full support
33
| Edge Full support 14 | Firefox Full support 11 | IE Full support 4 | Opera Full support 7 | Safari Full support 9 | WebView Android
Full support
Yes
| Chrome Android
Full support
33
| Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
paste event | Chrome Full support 58 | Edge Full support Yes | Firefox Full support Yes | IE Full support 11 | Opera Full support 45 | Safari Full support Yes | WebView Android Full support 58 | Chrome Android Full support 58 | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support 45 | Safari iOS ? | Samsung Internet Android ? |
prefix | Chrome
Full support
31
| Edge Full support 13 | Firefox
Full support
48
| IE ? | Opera Full support Yes | Safari Full support 10 | WebView Android Full support Yes | Chrome Android
Full support
31
| Edge Mobile Full support Yes | Firefox Android
Full support
48
| Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
querySelector | Chrome Full support 1 | Edge Full support 12 | Firefox Full support 3.5 | IE
Full support
9
| Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
querySelectorAll | Chrome Full support 1 | Edge Full support 12 | Firefox Full support 3.5 | IE
Full support
9
| Opera Full support 10 | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android ? | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
releasePointerCapture | Chrome Full support 55 | Edge Full support 12 | Firefox
Full support
59
| IE
Full support
11
| Opera Full support 42 | Safari No support No | WebView Android Full support 55 | Chrome Android Full support 55 | Edge Mobile ? | Firefox Android
No support
No
| Opera Android Full support 42 | Safari iOS No support No | Samsung Internet Android ? |
removeAttribute | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
removeAttributeNS | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
removeAttributeNode | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
requestFullscreen | Chrome
Full support
71
| Edge
No support
12 — 14
| Firefox
Full support
64
| IE
Full support
11
| Opera
Full support
58
| Safari
Full support
Yes
| WebView Android
Full support
71
| Chrome Android
Full support
71
| Edge Mobile
Full support
Yes
| Firefox Android
Full support
64
| Opera Android
Full support
58
| Safari iOS
Full support
Yes
| Samsung Internet Android
Full support
Yes
|
requestPointerLock | Chrome
Full support
Yes
| Edge Full support 13 | Firefox
Full support
50
| IE ? | Opera ? | Safari Full support 10 | WebView Android
Full support
Yes
| Chrome Android
Full support
Yes
| Edge Mobile Full support Yes | Firefox Android ? | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
runtimeStyle | Chrome No support No | Edge No support No | Firefox No support No | IE Full support 6 | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Edge Mobile No support No | Firefox Android No support No | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
scroll | Chrome Full support 45 | Edge No support No | Firefox Full support Yes | IE No support No | Opera Full support 32 | Safari Full support 10 | WebView Android Full support 45 | Chrome Android Full support 45 | Edge Mobile No support No | Firefox Android Full support Yes | Opera Android Full support 32 | Safari iOS No support No | Samsung Internet Android Full support Yes |
scrollBy | Chrome Full support 45 | Edge No support No | Firefox Full support Yes | IE No support No | Opera Full support 32 | Safari Full support 10 | WebView Android Full support 45 | Chrome Android Full support 45 | Edge Mobile No support No | Firefox Android Full support Yes | Opera Android Full support 32 | Safari iOS No support No | Samsung Internet Android Full support Yes |
scrollIntoView | Chrome Full support 29 | Edge
Full support
17
| Firefox Full support 1 | IE
Full support
8
| Opera Full support 38 | Safari
Full support
6
| WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android Full support 4 | Opera Android Full support Yes | Safari iOS
Full support
5
| Samsung Internet Android ? |
scrollIntoViewIfNeeded | Chrome Full support Yes | Edge No support No | Firefox No support No | IE No support No | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile No support No | Firefox Android No support No | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android ? |
scrollHeight | Chrome Full support 4 | Edge Full support 12 | Firefox
Full support
21
| IE Full support 8 | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support 4 | Samsung Internet Android Full support Yes |
scrollLeft | Chrome Full support 43 | Edge Full support 12 | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support 6 | WebView Android Full support 43 | Chrome Android Full support 43 | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
scrollLeftMax | Chrome No support No | Edge No support No | Firefox Full support 16 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Edge Mobile No support No | Firefox Android Full support 16 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
scrollTo | Chrome Full support 45 | Edge No support No | Firefox Full support Yes | IE No support No | Opera Full support 32 | Safari Full support 10 | WebView Android Full support 45 | Chrome Android Full support 45 | Edge Mobile No support No | Firefox Android Full support Yes | Opera Android Full support 32 | Safari iOS No support No | Samsung Internet Android Full support Yes |
scrollTop | Chrome Full support 43 | Edge Full support 12 | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support 43 | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
scrollTopMax | Chrome No support No | Edge No support No | Firefox Full support 16 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Edge Mobile No support No | Firefox Android Full support 16 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
scrollWidth | Chrome Full support 43 | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support 43 | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
setAttribute | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
setAttributeNS | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
setAttributeNode | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
setAttributeNodeNS | Chrome Full support Yes | Edge
Full support
12
| Firefox Full support Yes | IE
Full support
Yes
| Opera ? | Safari Full support 6 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android ? | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
setCapture | Chrome No support No | Edge ? | Firefox Full support Yes | IE ? | Opera No support No | Safari ? | WebView Android No support No | Chrome Android No support No | Edge Mobile ? | Firefox Android ? | Opera Android No support No | Safari iOS ? | Samsung Internet Android ? |
setPointerCapture | Chrome Full support 55 | Edge Full support 12 | Firefox
Full support
59
| IE
Full support
11
| Opera Full support 42 | Safari No support No | WebView Android Full support 55 | Chrome Android Full support 55 | Edge Mobile ? | Firefox Android
No support
No
| Opera Android Full support 42 | Safari iOS No support No | Samsung Internet Android ? |
shadowRoot | Chrome Full support 43 | Edge
No support
No
| Firefox
Full support
63
| IE No support No | Opera Full support 40 | Safari Full support 10 | WebView Android Full support 43 | Chrome Android Full support 43 | Edge Mobile
No support
No
| Firefox Android
Full support
63
| Opera Android Full support 40 | Safari iOS Full support Yes | Samsung Internet Android ? |
slot | Chrome Full support 53 | Edge ? | Firefox Full support 63 | IE ? | Opera ? | Safari Full support 10 | WebView Android Full support 53 | Chrome Android Full support 53 | Edge Mobile ? | Firefox Android Full support 63 | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
tabStop | Chrome Full support 43 | Edge ? | Firefox ? | IE ? | Opera ? | Safari ? | WebView Android ? | Chrome Android Full support 43 | Edge Mobile ? | Firefox Android ? | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
tagName | Chrome Full support 43 | Edge Full support 12 | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support 6 | WebView Android Full support 43 | Chrome Android Full support 43 | Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
toggleAttribute | Chrome Full support 69 | Edge Full support 18 | Firefox Full support 63 | IE ? | Opera Full support 56 | Safari Full support 12 | WebView Android Full support 69 | Chrome Android Full support 69 | Edge Mobile ? | Firefox Android Full support 63 | Opera Android Full support 56 | Safari iOS ? | Samsung Internet Android ? |
touchcancel event | Chrome Full support 22 | Edge Full support 12 | Firefox Full support 52 | IE No support No | Opera No support No | Safari No support No | WebView Android Full support Yes | Chrome Android Full support 25 | Edge Mobile Full support 12 | Firefox Android Full support 6 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
touchend event | Chrome Full support 22 | Edge Full support 12 | Firefox Full support 52 | IE No support No | Opera No support No | Safari No support No | WebView Android Full support Yes | Chrome Android Full support 25 | Edge Mobile Full support 12 | Firefox Android Full support 6 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
touchmove event | Chrome Full support 22 | Edge Full support 12 | Firefox Full support 52 | IE No support No | Opera No support No | Safari No support No | WebView Android Full support Yes | Chrome Android Full support 25 | Edge Mobile Full support 12 | Firefox Android Full support 6 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
touchstart event | Chrome Full support 22 | Edge Full support 12 | Firefox Full support 52 | IE No support No | Opera No support No | Safari No support No | WebView Android Full support Yes | Chrome Android Full support 25 | Edge Mobile Full support 12 | Firefox Android Full support 6 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
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.