Element class
Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element.
- Implemented types
- Implementers
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- Element.new()
-
factory
Properties
-
addEventListener
→ ({void Function<
K$>(ElementEventMap< $1, void Function(String type, Object listener, [Object? options]) $2})K$> type, dynamic listener(K$), [Object? options]) -
Available on Element, provided by the Element$Typings extension
Overload accessor: $1, $2no setter - addEventListener ↔ void Function(String, [Object?, Object?])
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair - after ↔ void Function([Iterable?])
-
Available on ChildNode, provided by the ChildNode$Typings extension
getter/setter pair - animate ↔ Animation Function([dynamic, Object?])
-
Available on Animatable, provided by the Animatable$Typings extension
getter/setter pair - append ↔ void Function([Iterable?])
-
Available on ParentNode, provided by the ParentNode$Typings extension
getter/setter pair -
appendChild
↔ T Function<
T extends Node>(T) -
Available on Node, provided by the Node$Typings extension
getter/setter pair - ariaAtomic ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaAutoComplete ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaBusy ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaChecked ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaColCount ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaColIndex ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaColSpan ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaCurrent ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaDisabled ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaExpanded ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaHasPopup ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaHidden ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaInvalid ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
getter/setter pair - ariaKeyShortcuts ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaLabel ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaLevel ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaLive ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaModal ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaMultiLine ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaMultiSelectable ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaOrientation ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaPlaceholder ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaPosInSet ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaPressed ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaReadOnly ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaRequired ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaRoleDescription ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaRowCount ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaRowIndex ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaRowSpan ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaSelected ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaSetSize ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaSort ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaValueMax ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaValueMin ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaValueNow ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - ariaValueText ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
MDN Referencegetter/setter pair - assignedSlot → HTMLSlotElement?
-
Available on Slottable, provided by the Slottable$Typings extension
MDN Referenceno setter - attachShadow ↔ ShadowRoot Function(ShadowRootInit)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - attributeNode → num
-
Available on Node, provided by the Node$Typings extension
no setter - attributes → NamedNodeMap
-
Available on Element, provided by the Element$Typings extension
MDN Referenceno setter - baseURI → String
-
Available on Node, provided by the Node$Typings extension
Returns node's node document's document base URL.no setter - before ↔ void Function([Iterable?])
-
Available on ChildNode, provided by the ChildNode$Typings extension
getter/setter pair - cdataSectionNode → num
-
Available on Node, provided by the Node$Typings extension
node is a CDATASection node.no setter - checkVisibility ↔ bool Function([CheckVisibilityOptions?])
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - childElementCount → num
-
Available on ParentNode, provided by the ParentNode$Typings extension
MDN Referenceno setter -
childNodes
→ NodeListOf<
ChildNode> -
Available on Node, provided by the Node$Typings extension
Returns the children.no setter - children → HTMLCollection
-
Available on ParentNode, provided by the ParentNode$Typings extension
Returns the child elements.no setter - classList → DOMTokenList
-
Available on Element, provided by the Element$Typings extension
Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.no setter - className ↔ String
-
Available on Element, provided by the Element$Typings extension
Returns the value of element's class content attribute. Can be set to change it.getter/setter pair - clientHeight → num
-
Available on Element, provided by the Element$Typings extension
MDN Referenceno setter - clientLeft → num
-
Available on Element, provided by the Element$Typings extension
MDN Referenceno setter - clientTop → num
-
Available on Element, provided by the Element$Typings extension
MDN Referenceno setter - clientWidth → num
-
Available on Element, provided by the Element$Typings extension
MDN Referenceno setter - cloneNode ↔ Node Function([bool?])
-
Available on Node, provided by the Node$Typings extension
getter/setter pair -
closest
→ ({K$? Function<
K$ extends Element>(HTMLElementTagNameMap< $1, E? Function<K$> selector)E extends Element>(String selectors) $2}) -
Available on Element, provided by the Element$Typings extension
Overload accessor: $1, $2no setter - commentNode → num
-
Available on Node, provided by the Node$Typings extension
node is a Comment node.no setter - compareDocumentPosition ↔ num Function(Node)
-
Available on Node, provided by the Node$Typings extension
getter/setter pair - computedStyleMap ↔ StylePropertyMapReadOnly Function()
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - contains ↔ bool Function([Node?])
-
Available on Node, provided by the Node$Typings extension
getter/setter pair - dispatchEvent ↔ bool Function(Event)
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair - documentFragmentNode → num
-
Available on Node, provided by the Node$Typings extension
node is a DocumentFragment node.no setter - documentNode → num
-
Available on Node, provided by the Node$Typings extension
node is a document.no setter - documentPositionContainedBy → num
-
Available on Node, provided by the Node$Typings extension
Set when other is a descendant of node.no setter - documentPositionContains → num
-
Available on Node, provided by the Node$Typings extension
Set when other is an ancestor of node.no setter - documentPositionDisconnected → num
-
Available on Node, provided by the Node$Typings extension
Set when node and other are not in the same tree.no setter - documentPositionFollowing → num
-
Available on Node, provided by the Node$Typings extension
Set when other is following node.no setter - documentPositionImplementationSpecific → num
-
Available on Node, provided by the Node$Typings extension
no setter - documentPositionPreceding → num
-
Available on Node, provided by the Node$Typings extension
Set when other is preceding node.no setter - documentTypeNode → num
-
Available on Node, provided by the Node$Typings extension
node is a doctype.no setter - elementNode → num
-
Available on Node, provided by the Node$Typings extension
node is an element.no setter - entityNode → num
-
Available on Node, provided by the Node$Typings extension
no setter - entityReferenceNode → num
-
Available on Node, provided by the Node$Typings extension
no setter - firstChild → ChildNode?
-
Available on Node, provided by the Node$Typings extension
Returns the first child.no setter - firstElementChild → Element?
-
Available on ParentNode, provided by the ParentNode$Typings extension
Returns the first child that is an element, and null otherwise.no setter -
getAnimations
↔ List<
Animation> Function([GetAnimationsOptions?]) -
Available on Animatable, provided by the Animatable$Typings extension
getter/setter pair - getAttribute ↔ String? Function(String)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair -
getAttributeNames
↔ List<
String> Function() -
Available on Element, provided by the Element$Typings extension
getter/setter pair - getAttributeNode ↔ Attr? Function(String)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - getAttributeNodeNS ↔ Attr? Function(String, [String?])
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - getAttributeNS ↔ String? Function(String, [String?])
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - getBoundingClientRect ↔ DOMRect Function()
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - getClientRects ↔ DOMRectList Function()
-
Available on Element, provided by the Element$Typings extension
getter/setter pair -
getElementsByClassName
↔ HTMLCollectionOf<
Element> Function(String) -
Available on Element, provided by the Element$Typings extension
getter/setter pair -
getElementsByTagName
→ ({HTMLCollectionOf<
K$> Function<K$ extends Element>(HTMLElementTagNameMap< $1, HTMLCollectionOf<K$> qualifiedName)Element> Function(String qualifiedName) $2}) -
Available on Element, provided by the Element$Typings extension
Overload accessor: $1, $2no setter -
getElementsByTagNameNS
→ ({HTMLCollectionOf<
HTMLElement> Function(String namespaceURI, String localName) $1, HTMLCollectionOf<SVGElement> Function(String namespaceURI, String localName) $2, HTMLCollectionOf<MathMLElement> Function(String namespaceURI, String localName) $3, HTMLCollectionOf<Element> Function(String localName, [String? namespace]) $4}) -
Available on Element, provided by the Element$Typings extension
Overload accessor: $1, $2, $3, $4no setter - getRootNode ↔ Node Function([GetRootNodeOptions?])
-
Available on Node, provided by the Node$Typings extension
getter/setter pair - hasAttribute ↔ bool Function(String)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - hasAttributeNS ↔ bool Function(String, [String?])
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - hasAttributes ↔ bool Function()
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - hasChildNodes ↔ bool Function()
-
Available on Node, provided by the Node$Typings extension
getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- hasPointerCapture ↔ bool Function(num)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - id ↔ String
-
Available on Element, provided by the Element$Typings extension
Returns the value of element's id content attribute. Can be set to change it.getter/setter pair - innerHTML ↔ String
-
Available on InnerHTML, provided by the InnerHTML$Typings extension
MDN Referencegetter/setter pair - insertAdjacentElement ↔ Element? Function(InsertPosition, Element)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - insertAdjacentHTML ↔ void Function(InsertPosition, String)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - insertAdjacentText ↔ void Function(InsertPosition, String)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair -
insertBefore
↔ T Function<
T extends Node>(T, [Node?]) -
Available on Node, provided by the Node$Typings extension
getter/setter pair - isConnected → bool
-
Available on Node, provided by the Node$Typings extension
Returns true if node is connected and false otherwise.no setter - isDefaultNamespace ↔ bool Function([String?])
-
Available on Node, provided by the Node$Typings extension
getter/setter pair - isEqualNode ↔ bool Function([Node?])
-
Available on Node, provided by the Node$Typings extension
getter/setter pair - isSameNode ↔ bool Function([Node?])
-
Available on Node, provided by the Node$Typings extension
getter/setter pair - lastChild → ChildNode?
-
Available on Node, provided by the Node$Typings extension
Returns the last child.no setter - lastElementChild → Element?
-
Available on ParentNode, provided by the ParentNode$Typings extension
Returns the last child that is an element, and null otherwise.no setter - localName → String
-
Available on Element, provided by the Element$Typings extension
Returns the local name.no setter - lookupNamespaceURI ↔ String? Function([String?])
-
Available on Node, provided by the Node$Typings extension
getter/setter pair - lookupPrefix ↔ String? Function([String?])
-
Available on Node, provided by the Node$Typings extension
getter/setter pair - matches ↔ bool Function(String)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - namespaceURI → String?
-
Available on Element, provided by the Element$Typings extension
Returns the namespace.no setter - nextElementSibling → Element?
-
Available on NonDocumentTypeChildNode, provided by the NonDocumentTypeChildNode$Typings extension
Returns the first following sibling that is an element, and null otherwise.no setter - nextSibling → ChildNode?
-
Available on Node, provided by the Node$Typings extension
Returns the next sibling.no setter - nodeName → String
-
Available on Node, provided by the Node$Typings extension
Returns a string appropriate for the type of node.no setter - nodeType → num
-
Available on Node, provided by the Node$Typings extension
Returns the type of node.no setter - nodeValue ↔ String?
-
Available on Node, provided by the Node$Typings extension
MDN Referencegetter/setter pair - normalize ↔ void Function()
-
Available on Node, provided by the Node$Typings extension
getter/setter pair - notationNode → num
-
Available on Node, provided by the Node$Typings extension
no setter - onfullscreenchange ↔ dynamic Function(Event)?
-
Available on Element, provided by the Element$Typings extension
MDN Referencegetter/setter pair - onfullscreenerror ↔ dynamic Function(Event)?
-
Available on Element, provided by the Element$Typings extension
MDN Referencegetter/setter pair - outerHTML ↔ String
-
Available on Element, provided by the Element$Typings extension
MDN Referencegetter/setter pair - ownerDocument → Document?
-
Available on Node, provided by the Node$Typings extension
Returns the node document. Returns null for documents.no setter - ownerDocument → Document
-
Available on Element, provided by the Element$Typings extension
Returns the node document. Returns null for documents.no setter - parentElement → HTMLElement?
-
Available on Node, provided by the Node$Typings extension
Returns the parent element.no setter - parentNode → ParentNode?
-
Available on Node, provided by the Node$Typings extension
Returns the parent.no setter - part → DOMTokenList
-
Available on Element, provided by the Element$Typings extension
MDN Referenceno setter - prefix → String?
-
Available on Element, provided by the Element$Typings extension
Returns the namespace prefix.no setter - prepend ↔ void Function([Iterable?])
-
Available on ParentNode, provided by the ParentNode$Typings extension
getter/setter pair - previousElementSibling → Element?
-
Available on NonDocumentTypeChildNode, provided by the NonDocumentTypeChildNode$Typings extension
Returns the first preceding sibling that is an element, and null otherwise.no setter - previousSibling → ChildNode?
-
Available on Node, provided by the Node$Typings extension
Returns the previous sibling.no setter - processingInstructionNode → num
-
Available on Node, provided by the Node$Typings extension
node is a ProcessingInstruction node.no setter -
querySelector
→ ({K$? Function<
K$ extends Element>(HTMLElementTagNameMap< $1, E? Function<K$> selectors)E extends Element>(String selectors) $2}) -
Available on ParentNode, provided by the ParentNode$Typings extension
Overload accessor: $1, $2no setter -
querySelectorAll
→ ({NodeListOf<
K$> Function<K$ extends Element>(HTMLElementTagNameMap< $1, NodeListOf<K$> selectors)E> Function<E extends Element>(String selectors) $2}) -
Available on ParentNode, provided by the ParentNode$Typings extension
Overload accessor: $1, $2no setter - releasePointerCapture ↔ void Function(num)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - remove ↔ void Function()
-
Available on ChildNode, provided by the ChildNode$Typings extension
getter/setter pair - removeAttribute ↔ void Function(String)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - removeAttributeNode ↔ Attr Function(Attr)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - removeAttributeNS ↔ void Function(String, [String?])
-
Available on Element, provided by the Element$Typings extension
getter/setter pair -
removeChild
↔ T Function<
T extends Node>(T) -
Available on Node, provided by the Node$Typings extension
getter/setter pair - removeEventListener ↔ void Function(String, [Object?, Object?])
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair -
removeEventListener
→ ({void Function<
K$>(ElementEventMap< $1, void Function(String type, Object listener, [Object? options]) $2})K$> type, dynamic listener(K$), [Object? options]) -
Available on Element, provided by the Element$Typings extension
Overload accessor: $1, $2no setter -
replaceChild
↔ T Function<
T extends Node>(Node, T) -
Available on Node, provided by the Node$Typings extension
getter/setter pair - replaceChildren ↔ void Function([Iterable?])
-
Available on ParentNode, provided by the ParentNode$Typings extension
getter/setter pair - replaceWith ↔ void Function([Iterable?])
-
Available on ChildNode, provided by the ChildNode$Typings extension
getter/setter pair -
requestFullscreen
↔ Future<
void> Function([FullscreenOptions?]) -
Available on Element, provided by the Element$Typings extension
getter/setter pair - requestPointerLock ↔ void Function()
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - role ↔ String?
-
Available on ARIAMixin, provided by the ARIAMixin$Typings extension
getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scroll → ({void Function([ScrollToOptions? options]) $1, void Function(num x, num y) $2})
-
Available on Element, provided by the Element$Typings extension
Overload accessor: $1, $2no setter - scrollBy → ({void Function([ScrollToOptions? options]) $1, void Function(num x, num y) $2})
-
Available on Element, provided by the Element$Typings extension
Overload accessor: $1, $2no setter - scrollHeight → num
-
Available on Element, provided by the Element$Typings extension
MDN Referenceno setter - scrollIntoView ↔ void Function([Object?])
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - scrollLeft ↔ num
-
Available on Element, provided by the Element$Typings extension
MDN Referencegetter/setter pair - scrollTo → ({void Function([ScrollToOptions? options]) $1, void Function(num x, num y) $2})
-
Available on Element, provided by the Element$Typings extension
Overload accessor: $1, $2no setter - scrollTop ↔ num
-
Available on Element, provided by the Element$Typings extension
MDN Referencegetter/setter pair - scrollWidth → num
-
Available on Element, provided by the Element$Typings extension
MDN Referenceno setter - setAttribute ↔ void Function(String, String)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - setAttributeNode ↔ Attr? Function(Attr)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - setAttributeNodeNS ↔ Attr? Function(Attr)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - setAttributeNS ↔ void Function(String, String, [String?])
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - setPointerCapture ↔ void Function(num)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - shadowRoot → ShadowRoot?
-
Available on Element, provided by the Element$Typings extension
Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise.no setter - slot ↔ String
-
Available on Element, provided by the Element$Typings extension
Returns the value of element's slot content attribute. Can be set to change it.getter/setter pair - tagName → String
-
Available on Element, provided by the Element$Typings extension
Returns the HTML-uppercased qualified name.no setter - textContent ↔ String?
-
Available on Node, provided by the Node$Typings extension
MDN Referencegetter/setter pair - textNode → num
-
Available on Node, provided by the Node$Typings extension
node is a Text node.no setter - toggleAttribute ↔ bool Function(String, [bool?])
-
Available on Element, provided by the Element$Typings extension
getter/setter pair - webkitMatchesSelector ↔ bool Function(String)
-
Available on Element, provided by the Element$Typings extension
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited