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

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

Issue 268313002: [dart:html] rename register to registerElement per spec (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 years, 7 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/impl/impl_Element.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 70662bd9c86579ab87b259051a2cab848e436cee..1cfbdcb4025852ab8f6024473129578f8102d7b6 100644
--- a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
@@ -219,7 +219,7 @@ $endif
* }
*
* main() {
- * document.register('x-foo', FooElement);
+ * document.registerElement('x-foo', FooElement);
* var myFoo = new Element.tag('x-foo');
* // prints 'FooElement created!' to the console.
* }
@@ -236,7 +236,7 @@ $endif
* }
*
* main() {
- * document.register('x-bar', BarElement);
+ * document.registerElement('x-bar', BarElement);
* var myBar = new Element.tag('input', 'x-bar');
* // prints 'BarElement created!' to the console.
* }
@@ -245,16 +245,22 @@ $endif
* `<input is="x-bar"></input>`
*
*/
+ void registerElement(String tag, Type customElementClass,
+ {String extendsTag}) {
$if DART2JS
- void register(String tag, Type customElementClass, {String extendsTag}) {
_registerCustomElement(JS('', 'window'), this, tag, customElementClass,
extendsTag);
- }
$else
- void register(String tag, Type customElementClass, {String extendsTag}) {
_Utils.register(this, tag, customElementClass, extendsTag);
- }
$endif
+ }
+
+ /** *Deprecated*: use [registerElement] instead. */
+ @deprecated
+ @Experimental()
+ void register(String tag, Type customElementClass, {String extendsTag}) {
+ return registerElement(tag, customElementClass, extendsTag: extendsTag);
+ }
/**
* Static factory designed to expose `visibilitychange` events to event
« no previous file with comments | « tools/dom/templates/html/impl/impl_Element.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698