Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate

Issue 220403008: Revert "Adding a mechanism to 'upgrade' the Dart type of elements" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/templates/html/dartium/html_dartium.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
index 3e44809eb5ab119c99c4fcb60c27b61190808dba..973c9d45e0219fd236128b8ce5343f2044138f7d 100644
--- a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
@@ -244,6 +244,32 @@ $endif
* This custom element can also be instantiated via HTML using the syntax
* `<input is="x-bar"></input>`
*
+ * The [nativeTagName] parameter is needed by platforms without native support
+ * when subclassing a native type other than:
+ *
+ * * HtmlElement
+ * * SvgElement
+ * * AnchorElement
+ * * AudioElement
+ * * ButtonElement
+ * * CanvasElement
+ * * DivElement
+ * * ImageElement
+ * * InputElement
+ * * LIElement
+ * * LabelElement
+ * * MenuElement
+ * * MeterElement
+ * * OListElement
+ * * OptionElement
+ * * OutputElement
+ * * ParagraphElement
+ * * PreElement
+ * * ProgressElement
+ * * SelectElement
+ * * SpanElement
+ * * UListElement
+ * * VideoElement
*/
$if DART2JS
void register(String tag, Type customElementClass, {String extendsTag}) {
@@ -295,30 +321,4 @@ $endif
@Experimental()
Stream<Event> get onVisibilityChange =>
visibilityChangeEvent.forTarget(this);
-
- /// 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.
- @Experimental()
- ElementUpgrader createElementUpgrader(Type type, {String extendsTag}) {
-$if DART2JS
- return new _JSElementUpgrader(this, type, extendsTag);
-$else
- return new _VMElementUpgrader(this, type, extendsTag);
-$endif
- }
-}
-
-/// A utility for changing the Dart wrapper type for elements.
-abstract class ElementUpgrader {
- /// Upgrade the specified element to be of the Dart type this was created for.
- ///
- /// After upgrading the element passed in is invalid and the returned value
- /// should be used instead.
- Element upgrade(Element element);
}
« no previous file with comments | « tools/dom/templates/html/dartium/html_dartium.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698