elementVoid function

Element elementVoid(
  1. String tagname, [
  2. String? key,
  3. List<Object>? staticPropertyValuePairs,
  4. List<Object>? propertyValuePairs,
])

A combination of elementOpen, followed by elementClose.

The tagname is name of the tag, e.g. 'div' or 'span'. This could also be the tag of a custom element.

A key identifies Element for reuse. See 'Keys and Arrays' in the IncrementalDOM documentation.

staticPropertyValuePairs is a list of pairs of property names and values. Depending on the type of the value, these will be set as either attributes or properties on the Element. These are only set on the Element once during creation. These will not be updated during subsequent passes. See 'Statics Array' in the IncrementalDOM documentation.

propertyValuePairs is a list of pairs of property names and values. Depending on the type of the value, these will be set as either attributes or properties on the Element.

Returns the corresponding DOM Element.

Implementation

Element elementVoid(
  String tagname, [
  String? key,
  List<Object>? staticPropertyValuePairs,
  List<Object>? propertyValuePairs,
]) {
  return _incDom.callMethod('elementVoid', <Object?>[
    tagname,
    key,
    JsArray.from(_mapArgs(staticPropertyValuePairs)),
    ..._mapArgs(propertyValuePairs),
  ]) as Element;
}