createElementUpgrader method

ElementUpgrader createElementUpgrader (
  1. Type type,
  2. {String? extendsTag}
)

Creates an element upgrader which can be used to change the Dart wrapper type for elements.

The type specified must be a subclass of HtmlElement, when an element is upgraded then the created constructor will be invoked on that element.

If the type is not a direct subclass of HtmlElement then the extendsTag parameter must be provided.

Implementation

ElementUpgrader createElementUpgrader(Type type, {String? extendsTag}) {
  return new _JSElementUpgrader(this, type, extendsTag);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-html/HtmlDocument/createElementUpgrader.html