elementOpenStart function

void elementOpenStart(
  1. String tagname, [
  2. String? key,
  3. List<Object>? staticPropertyValuePairs
])

Used with attr and elementOpenEnd to declare an element.

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.

Implementation

void elementOpenStart(
  String tagname, [
  String? key,
  List<Object>? staticPropertyValuePairs,
]) {
  final args = [
    tagname,
    key,
    JsArray.from(_mapArgs(staticPropertyValuePairs)),
  ];
  _incDom.callMethod('elementOpenStart', args);
}