DOM.DOMElement (dom v0.1.0)

Defines interface Element https://dom.spec.whatwg.org/#interface-element

Link to this section Summary

Link to this section Types

@type t() ::
  Map.merge(DOM.DOMNode.t(), %{
    namespace_uri: binary(),
    prefix: binary(),
    local_name: binary(),
    tag_name: binary(),
    id: binary(),
    class_name: binary(),
    class_list: list(),
    slot: binary(),
    attributes: keyword(),
    shadow_root: map()
  })

Link to this section Functions

Link to this function

attach_shadow(element, mode, delegate_focus \\ false, slot_assignment \\ :named)

@spec attach_shadow(t(), :open | :closed, boolean(), :manual | :named) :: t()

https://dom.spec.whatwg.org/#dom-element-attachshadow

Link to this function

get_attribute(element, qualified_name)

@spec get_attribute(t(), binary()) :: binary()

https://dom.spec.whatwg.org/#dom-element-getattribute

Link to this function

get_attribute_names(element)

@spec get_attribute_names(t()) :: [binary()]

https://dom.spec.whatwg.org/#dom-element-getattributenames

Link to this function

get_attribute_node(element, qualified_name)

@spec get_attribute_node(t(), binary()) :: DOM.DOMAttr.t()

https://dom.spec.whatwg.org/#dom-element-getattributenode

Link to this function

get_attribute_nodes(element)

@spec get_attribute_nodes(t()) :: [DOM.DOMAttr.t()]

This function is not part of the official DOM Element interface

Link to this function

get_element_by_id(element, element_id)

@spec get_element_by_id(t(), binary()) :: t()

https://dom.spec.whatwg.org/#dom-nonelementparentnode-getelementbyid

Link to this function

get_elements_by_id(dom_element, element_id)

Link to this function

get_elements_by_tag_name(element, qualified_name)

@spec get_elements_by_tag_name(t(), binary()) :: [t()]

https://dom.spec.whatwg.org/#dom-element-getelementsbytagname

Link to this function

has_attribute(element, qualified_name)

@spec has_attribute(t(), binary()) :: boolean()

https://dom.spec.whatwg.org/#dom-element-hasattribute

Link to this function

has_attributes(element)

@spec has_attributes(t()) :: boolean()

https://dom.spec.whatwg.org/#dom-element-hasattributes

Link to this function

set_attribute(element, qualified_name, value)

@spec set_attribute(t(), binary(), binary()) :: t()

https://dom.spec.whatwg.org/#dom-element-setattribute

Link to this function

set_attribute_node(element, attribute)

@spec set_attribute_node(t(), DOM.DOMAttr.t()) :: t()

https://dom.spec.whatwg.org/#dom-element-setattributenode