DocumentFragment

Overview

The DocumentFragment interface represents 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.

Location

Required Methods


getElementById

Returns the first Element node within the DocumentFragment, in document order, that matches the specified ID. Functionally equivalent to Document.getElementById().

 

method getElementById: Element

 

Element getElementById()

 

func getElementById() -> Element

 

Element getElementById()

 

Function getElementById() As Element

querySelector

Returns the first Element node within the DocumentFragment, in document order, that matches the specified selectors.

 

method querySelector(parselectors: dynamic): Element

 

Element querySelector(dynamic parselectors)

 

func querySelector(_ parselectors: dynamic) -> Element

 

Element querySelector(dynamic parselectors)

 

Function querySelector(parselectors As dynamic) As Element

Parameters:

  • parselectors:

querySelectorAll

Returns a NodeList of all the Element nodes within the DocumentFragment that match the specified selectors.

 

method querySelectorAll(parselectors: dynamic): HTMLElement

 

HTMLElement querySelectorAll(dynamic parselectors)

 

func querySelectorAll(_ parselectors: dynamic) -> HTMLElement

 

HTMLElement querySelectorAll(dynamic parselectors)

 

Function querySelectorAll(parselectors As dynamic) As HTMLElement

Parameters:

  • parselectors: