DOM.DOMDocument behaviour (dom v0.1.0)

Implements interface Document https://dom.spec.whatwg.org/#interface-document

Link to this section Summary

Link to this section Types

@type t() ::
  Map.merge(DOM.DOMNode.t(), %{
    url: binary(),
    document_uri: binary(),
    compat_mode: binary(),
    character_set: binary(),
    charset: binary(),
    input_encoding: binary(),
    content_type: binary(),
    document_element: DOM.DOMElement.t(),
    doctype_name: binary(),
    doctype_public_id: binary(),
    doctype_system_id: binary()
  })

Link to this section Callbacks

Link to this callback

create_element(t, local_name, opts)

@callback create_element(t(), local_name :: binary(), opts :: %{}) :: any()

Creates an Element.

https://dom.spec.whatwg.org/#dom-document-createelement

Link to this callback

create_element_ns(t, namespace, qualified_name, opts)

@callback create_element_ns(
  t(),
  namespace :: binary(),
  qualified_name :: binary(),
  opts :: %{}
) :: any()

https://dom.spec.whatwg.org/#dom-document-createelementns

Link to this section Functions

Link to this function

create_attribute(document, local_name)

@spec create_attribute(t(), local_name :: binary()) :: DOM.DOMAttr.t()

https://dom.spec.whatwg.org/#dom-document-createattribute

Link to this function

create_attribute_ns(document, namespace, qualified_name)

@spec create_attribute_ns(t(), namespace :: binary(), qualified_name :: binary()) ::
  DOM.DOMAttr.t()

https://dom.spec.whatwg.org/#dom-document-createattributens

Link to this function

create_cdata_section(document, data)

https://dom.spec.whatwg.org/#dom-document-createcdatasection

Link to this function

create_comment(document, data)

https://dom.spec.whatwg.org/#dom-document-createcomment

Link to this function

create_document_fragment(document)

@spec create_document_fragment(t()) :: DOM.DOMDocumentFragment.t()

https://dom.spec.whatwg.org/#dom-document-createdocumentfragment

Link to this function

create_processing_instruction(document, target, data)

@spec create_processing_instruction(t(), target :: binary(), data :: binary()) ::
  DOM.DOMText.t()

https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction

Link to this function

create_text_node(document, data)

@spec create_text_node(t(), data :: binary()) :: DOM.DOMText.t()
@spec create_text_node(t(), data :: binary()) :: DOM.DOMText.t()
@spec create_text_node(t(), data :: binary()) :: DOM.DOMText.t()

https://dom.spec.whatwg.org/#dom-document-createtextnode

Link to this function

validate_and_extract(namespace, qualified_name)

@spec validate_and_extract(namespace :: binary(), qualified_name :: binary()) ::
  {namespace :: binary(), prefix :: binary(), local_name :: binary()}

https://dom.spec.whatwg.org/#validate-and-extract