d4_web library

D4 packages that depend on the web platform.

See one of:

  • d4_selection - Transform the DOM by selecting elements and joining to data.

Classes

Local
D4 locals allow you to define local state independent of data.
Selection

Properties

namespaces Map<String, String> Namespaces
The map of registered namespace prefixes. The initial value is:
final

Functions

create(String name) Selection
Given the specified element name, returns a single-element selection containing a detached element of the given name in the current document.
creator(String name) → Element Function(Element, [JSAny?, int?, List<Element?>?])
Given the specified element name, returns a function which creates an element of the given name, assuming that thisArg is the parent element.
matcher(String selector) bool Function(Element, [JSAny?, int?, List<Element?>?])
Given the specified selector, returns a function which returns true if this element matches the specified selector.
namespace(String name) → Union2<Map<String, String>, String>
Qualifies the specified name, which may or may not have a namespace prefix.
select([Union2<String, Element>? selector]) Selection
Selects the first element that matches the specified selector string.
selectAll([Union3<String, Iterable<Element?>, Object>? selector]) Selection
Selects all elements that match the specified selector string.
selection() Selection
Selects the root element, document.documentElement.]
selector([String? selector]) → Element? Function(Element, [JSAny?, int?, List<Element?>?])
Given the specified selector, returns a function which returns the first descendant of this element that matches the specified selector.
selectorAll([String? selector]) List<Element?> Function(Element, [JSAny?, int?, List<Element?>?])
Given the specified selector, returns a function which returns all descendants of this element that match the specified selector.
style(Element? node, String name) String?
Returns the value of the style property with the specified name for the specified node.
window(EventTarget node) → Window
Returns the owner window for the specified node.