This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2023.
* Some parts of this feature may have varying levels of support.
The MathMLElement interface represents any MathML element.
Also inherits properties from its parent, Element.
MathMLElement.attributeStyleMap Read only
A StylePropertyMap representing the declarations of the element's style attribute.
MathMLElement.autofocusWhether the control should be focused when the page loads, or when a <dialog> or popover become shown.
MathMLElement.dataset Read only
A DOMStringMap object which provides a list of key/value pairs of named data attributes which correspond to custom data attributes attached to the element. This works just like HTML's HTMLElement.dataset property and HTML's data-* global attribute.
MathMLElement.styleA CSSStyleDeclaration representing the declarations of the element's style attribute.
MathMLElement.tabIndexThe position of the element in the tabbing order.
This interface also inherits methods from its parent, Element.
MathMLElement.blur()Removes keyboard focus from the currently focused element.
MathMLElement.focus()Makes the element the current keyboard focus.
<math>
<msqrt>
<mi>x</mi>
</msqrt>
</math>
document.querySelector("msqrt").constructor.name; // MathMLElement
| Specification |
|---|
| MathML Core> # dom-mathmlelement> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
MathMLElement |
109 | 109 | 71 | 95 | 13.1 | 109 | 79 | 74 | 13.4 | 21.0 | 109 | 13.4 |
attributeStyleMap |
109 | 109 | No | 95 | 16.4 | 109 | No | 74 | 16.4 | 21.0 | 109 | 16.4 |
autofocus |
109 | 109 | 110 | 95 | 15.4 | 109 | 110 | 74 | 15.4 | 21.0 | 109 | 15.4 |
blur |
109 | 109 | 71 | 95 | 13.1 | 109 | 79 | 74 | 13.4 | 21.0 | 109 | 13.4 |
dataset |
109 | 109 | 71 | 95 | 13.1 | 109 | 79 | 74 | 13.4 | 21.0 | 109 | 13.4 |
focus |
109 | 109 | 71 | 95 | 13.1 | 109 | 79 | 74 | 13.4 | 21.0 | 109 | 13.4 |
nonce |
109 | 109 | No | 95 | 15.4 | 109 | No | 74 | 15.4 | 21.0 | 109 | 15.4 |
style |
109 | 109 | 71 | 95 | 13.1 | 109 | 79 | 74 | 13.4 | 21.0 | 109 | 13.4 |
tabIndex |
109 | 109 | 71 | 95 | 13.1 | 109 | 79 | 74 | 13.4 | 21.0 | 109 | 13.4 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MathMLElement