DocumentFragment class
A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made.
- Implemented types
- Implementers
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- DocumentFragment()
-
factory
Properties
- addEventListener ↔ void Function(String, [Object?, Object?])
-
Available on EventTarget, provided by the EventTarget$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 - attributeNode → num
-
Available on Node, provided by the Node$Typings extension
no setter - baseURI → String
-
Available on Node, provided by the Node$Typings extension
Returns node's node document's document base URL.no setter - cdataSectionNode → num
-
Available on Node, provided by the Node$Typings extension
node is a CDATASection node.no setter - 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 - cloneNode ↔ Node Function([bool?])
-
Available on Node, provided by the Node$Typings extension
getter/setter pair - 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 - 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 - getElementById ↔ HTMLElement? Function(String)
-
Available on DocumentFragment, provided by the DocumentFragment$Typings extension
getter/setter pair - getElementById ↔ Element? Function(String)
-
Available on NonElementParentNode, provided by the NonElementParentNode$Typings extension
getter/setter pair - getRootNode ↔ Node Function([GetRootNodeOptions?])
-
Available on Node, provided by the Node$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
-
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 - 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 - 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 - 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 DocumentFragment, provided by the DocumentFragment$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 - prepend ↔ void Function([Iterable?])
-
Available on ParentNode, provided by the ParentNode$Typings extension
getter/setter pair - 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 -
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 -
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 - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- 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
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