DocumentFragment class

Annotations
  • DomName('DocumentFragment')
Extends
Implements
Implemented by

Constructors

DocumentFragment()
DocumentFragment.html(String html, {NodeValidator validator, NodeTreeSanitizer treeSanitizer})
DocumentFragment.svg(String svgContent, {NodeValidator validator, NodeTreeSanitizer treeSanitizer})

Instance Properties

children List<Element>
read / write
innerHtml String
read / write
on Events Inherited
read-only
nodes List<Node> Inherited
read / write
baseUri String Inherited
read-only
childNodes List<Node> Inherited
read-only
firstChild Node Inherited
read-only
lastChild Node Inherited
read-only
nextNode Node Inherited
read-only
nodeName String Inherited
read-only
nodeType int Inherited
read-only
nodeValue String Inherited
read-only
ownerDocument Document Inherited
read-only
parent Element Inherited
read-only
parentNode Node Inherited
read-only
previousNode Node Inherited
read-only
text String Inherited
read / write

Instance Methods

querySelectorAll(String selectors) → ElementList<Element>
Finds all descendant elements of this document fragment that match the specified group of selectors.
setInnerHtml(String html, {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) → void
appendText(String text) → void
Adds the specified text as a text node after the last child of this document fragment.
appendHtml(String text, {NodeValidator validator, NodeTreeSanitizer, treeSanitizer}) → void
Parses the specified text as HTML and adds the resulting node after the last child of this document fragment.
query(String relativeSelectors) → Element
Alias for querySelector. Note this function is deprecated because its semantics will be changing in the future.
queryAll(String relativeSelectors) → ElementList<Element>
Alias for querySelectorAll. Note this function is deprecated because its semantics will be changing in the future.
getElementById(String elementId) → Element
querySelector(String selectors) → Element
Finds the first descendant element of this document fragment that matches the specified group of selectors.
toString() → String Inherited
Print out a String representation of this Node.
addEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void Inherited
removeEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void Inherited
dispatchEvent(Event event) → bool Inherited
remove() → void Inherited
Removes this node from the DOM.
replaceWith(Node otherNode) → Node Inherited
Replaces this node with another node.
insertAllBefore(Iterable<Node> newNodes, Node refChild) → Node Inherited
Inserts all of the nodes into this node directly before refChild.
append(Node newChild) → Node Inherited
Adds a node to the end of the child nodes list of this node.
clone(bool deep) → Node Inherited
Returns a copy of this node.
contains(Node other) → bool Inherited
Returns true if this node contains the specified node.
hasChildNodes() → bool Inherited
Returns true if this node has any children.
insertBefore(Node newChild, Node refChild) → Node Inherited
Inserts all of the nodes into this node directly before refChild.