docs.rodeo

MDN Web Docs mirror

Element

{{APIRef("DOM")}} 

Element is the most general base class from which all element objects (i.e. objects that represent elements) in a {{DOMxRef("Document")}}  inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element.

For example, the {{DOMxRef("HTMLElement")}}  interface is the base interface for HTML elements. Similarly, the {{DOMxRef("SVGElement")}}  interface is the basis for all SVG elements, and the {{DOMxRef("MathMLElement")}}  interface is the base interface for MathML elements. Most functionality is specified further down the class hierarchy.

Languages outside the realm of the Web platform, like XUL through the XULElement interface, also implement Element.

{{InheritanceDiagram}} 

Instance properties

Element inherits properties from its parent interface, {{DOMxRef("Node")}} , and by extension that interface’s parent, {{DOMxRef("EventTarget")}} .

Instance properties included from ARIA

The Element interface also includes the following properties.

Instance methods

Element inherits methods from its parents {{DOMxRef("Node")}} , and its own parent, {{DOMxRef("EventTarget")}} .

Events

Listen to these events using addEventListener() or by assigning an event listener to the oneventname property of this interface.

Animation events

Clipboard events

Composition events

Focus events

Fullscreen events

Keyboard events

Mouse events

Pointer events

Scroll events

Touch events

Transition events

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

In this article

View on MDN