W3cubDocs

/Dart 2

createElementUpgrader method

ElementUpgrader createElementUpgrader (Type type, { 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.dartlang.org/stable/2.0.0/dart-html/HtmlDocument/createElementUpgrader.html