Element is the most general base class from which all element objects (i.e. objects that represent elements) in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element. For example, the HTMLElement interface is the base interface for HTML elements. Similarly, the SVGElement interface is the basis for all SVG elements, and the 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. Element inherits properties from its parent interface, Node, and by extension that interface's parent, EventTarget. Returns a HTMLSlotElement representing the the node is inserted in. Returns a NamedNodeMap object containing the assigned attributes of the corresponding HTML element. Returns the number of child elements of this element. Returns the child elements of this element. Returns a DOMTokenList containing the list of class attributes.
A string representing the class of the element. Returns a number representing the inner height of the element. Returns a number representing the width of the left border of the element. Returns a number representing the width of the top border of the element. Returns a number representing the inner width of the element. A number indicating the effective zoom size of the element, or 1.0 if the element is not rendered. A string reflecting the elementtiming attribute which marks an element for observation in the PerformanceElementTiming API. Returns the first child element of this element. A string representing the id of the element. A string representing the markup of the element's content. Returns the last child element of this element. A string representing the local part of the qualified name of the element. The namespace URI of the element, or null if it is no namespace. Note: In Firefox 3.5 and earlier, HTML elements are in no namespace.
An Element, the element immediately following the given one in the tree, or null if there's no sibling node. A string representing the markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string. Represents the part identifier(s) of the element (i.e. set using the part attribute), returned as a DOMTokenList. A string representing the namespace prefix of the element, or null if no prefix is specified. An Element, the element immediately preceding the given one in the tree, or null if there is no sibling element. Returns a number representing the scroll view height of an element. A number representing the left scroll offset of the element. Returns a number representing the maximum left scroll offset possible for the element. A number representing number of pixels the top of the element is scrolled vertically. Returns a number representing the maximum top scroll offset possible for the element. Returns a number representing the scroll view width of the element.
Returns the open shadow root that is hosted by the element, or null if no open shadow root is present. Returns the name of the shadow DOM slot the element is inserted in. Returns a string with the name of the tag for the given element. The Element interface also includes the following properties. A string reflecting the aria-atomic attribute, which indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. A string reflecting the aria-autocomplete attribute, which indicates whether inputting text could trigger display of one or more predictions of the user's intended value for a combobox, searchbox, or textbox and specifies how predictions would be presented if they were made. A string reflecting the aria-braillelabel attribute, which defines the braille label of the element. A string reflecting the aria-brailleroledescription attribute, which defines the ARIA braille role description of the element. A string reflecting the aria-busy attribute, which indicates whether an element is being modified, as assistive technologies may want to wait until the modifications are complete before exposing them to the user.
A string reflecting the aria-checked attribute, which indicates the current "checked" state of checkboxes, radio buttons, and other widgets that have a checked state. A string reflecting the aria-colcount attribute, which defines the number of columns in a table, grid, or treegrid. A string reflecting the aria-colindex attribute, which defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. A string reflecting the aria-colindextext attribute, which defines a human readable text alternative of aria-colindex. A string reflecting the aria-colspan attribute, which defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. A string reflecting the aria-current attribute, which indicates the element that represents the current item within a container or set of related elements. A string reflecting the aria-description attribute, which defines a string value that describes or annotates the current element. A string reflecting the aria-disabled attribute, which indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
|