Optional
selector: nullSelect all elements that match the specified selector string. The elements will be selected in document order (top-to-bottom). If no elements in the document match the selector, returns an empty selection.
The first generic "GElement" refers to the type of element to be selected. The second generic "OldDatum" refers to the type of the datum, of a selected element. This is useful when re-selecting elements with a previously set, know datum type.
CSS selector string
Select the specified array, array-like, or iterable of nodes.
This is useful if you already have a reference to nodes, such as this.childNodes
within an event listener or a global such as document.links
.
The nodes may instead be an iterable, or a pseudo-array such as a NodeList.
The first generic "GElement" refers to the type of element to be selected. The second generic "OldDatum" refers to the type of the datum, of a selected element.
An array, array-like, or iterable of nodes
Create an empty selection.