Back to Content

MathMLElement

files/en-us/web/api/mathmlelement/index.md

latest1.9 KB
Original Source

{{APIRef("MathML")}}

The MathMLElement interface represents any MathML element.

{{InheritanceDiagram}}

Instance properties

Also inherits properties from its parent, {{DOMxRef("Element")}}.

  • {{DOMxRef("MathMLElement.attributeStyleMap")}} {{ReadOnlyInline}}
    • : A {{DOMxRef("StylePropertyMap")}} representing the declarations of the element's style attribute.
  • {{DOMxRef("MathMLElement.autofocus")}}
    • : Whether the control should be focused when the page loads, or when a {{htmlelement("dialog")}} or popover become shown.
  • {{DOMxRef("MathMLElement.dataset")}} {{ReadOnlyInline}}
    • : A {{DOMxRef("DOMStringMap")}} object which provides a list of key/value pairs of named data attributes which correspond to custom data attributes attached to the element. These correspond to MathML's data-* global attributes.
  • {{DOMxRef("MathMLElement.style")}}
    • : A {{DOMxRef("CSSStyleDeclaration")}} representing the declarations of the element's style attribute.
  • {{DOMxRef("MathMLElement.tabIndex")}}
    • : The position of the element in the tabbing order.

Instance methods

This interface also inherits methods from its parent, {{DOMxRef("Element")}}.

  • {{DOMxRef("MathMLElement.blur()")}}
    • : Removes keyboard focus from the currently focused element.
  • {{DOMxRef("MathMLElement.focus()")}}
    • : Makes the element the current keyboard focus.

Examples

MathML

html
<math>
  <msqrt>
    <mi>x</mi>
  </msqrt>
</math>

JavaScript

js
document.querySelector("msqrt").constructor.name; // MathMLElement

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{DOMxRef("Element")}}
  • {{DOMxRef("HTMLElement")}}
  • {{DOMxRef("SVGElement")}}