Dart API Reference
dart:html
DocumentFragment
DocumentFragment
class
Annotated by:
DomName('DocumentFragment')
Extends:
Node
EventTarget
Object
Implements:
ParentNode
Implementors
ShadowRoot
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
Inherited
( ) →
String
Print out a String representation of this Node.
addEventListener
Inherited
(
String
type
,
dynamic
listener
(
Event
event
)
, [
bool
useCapture
] ) →
void
removeEventListener
Inherited
(
String
type
,
dynamic
listener
(
Event
event
)
, [
bool
useCapture
] ) →
void
dispatchEvent
Inherited
(
Event
event
) →
bool
remove
Inherited
( ) →
void
Removes this node from the DOM.
replaceWith
Inherited
(
Node
otherNode
) →
Node
Replaces this node with another node.
insertAllBefore
Inherited
(
Iterable
<
Node
>
newNodes
,
Node
refChild
) →
Node
Inserts all of the nodes into this node directly before refChild.
append
Inherited
(
Node
newChild
) →
Node
Adds a node to the end of the child
nodes
list of this node.
clone
Inherited
(
bool
deep
) →
Node
Returns a copy of this node.
contains
Inherited
(
Node
other
) →
bool
Returns true if this node contains the specified node.
hasChildNodes
Inherited
( ) →
bool
Returns true if this node has any children.
insertBefore
Inherited
(
Node
newChild
,
Node
refChild
) →
Node
Inserts all of the nodes into this node directly before refChild.