Index: sdk/lib/html/dart2js/html_dart2js.dart |
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart |
index bb00f1769cfd353a1dcabd840e22c8bbc6957e71..fbbdd1a49d8fb2d2a1218a1358f84769d501f267 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -7752,11 +7752,15 @@ class Document extends Node native "Document" |
ElementList queryAll(String relativeSelectors) => |
querySelectorAll(relativeSelectors); |
- /// Checks if [register] is supported on the current platform. |
- bool get supportsRegister { |
+ /// Checks if [registerElement] is supported on the current platform. |
+ bool get supportsRegisterElement { |
return JS('bool', '("registerElement" in #)', this); |
} |
+ /// *Deprecated*: use [supportsRegisterElement] instead. |
+ @deprecated |
+ bool get supportsRegister => supportsRegisterElement; |
+ |
@DomName('Document.createElement') |
Element createElement(String tagName, [String typeExtension]) { |
return _createElement(tagName, typeExtension); |
@@ -9317,7 +9321,7 @@ abstract class Element extends Node implements GlobalEventHandlers, ParentNode, |
* // Perform any element initialization. |
* } |
* } |
- * document.register('x-custom', CustomElement); |
+ * document.registerElement('x-custom', CustomElement); |
*/ |
Element.created() : super._created() { |
// Validate that this is a custom element & perform any additional |
@@ -14352,7 +14356,7 @@ class HtmlDocument extends Document native "HTMLDocument" { |
* } |
* |
* main() { |
- * document.register('x-foo', FooElement); |
+ * document.registerElement('x-foo', FooElement); |
* var myFoo = new Element.tag('x-foo'); |
* // prints 'FooElement created!' to the console. |
* } |
@@ -14369,7 +14373,7 @@ class HtmlDocument extends Document native "HTMLDocument" { |
* } |
* |
* 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. |
* } |
@@ -14378,11 +14382,19 @@ class HtmlDocument extends Document native "HTMLDocument" { |
* `<input is="x-bar"></input>` |
* |
*/ |
- void register(String tag, Type customElementClass, {String extendsTag}) { |
+ void registerElement(String tag, Type customElementClass, |
+ {String extendsTag}) { |
_registerCustomElement(JS('', 'window'), this, tag, customElementClass, |
extendsTag); |
} |
+ /** *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 |
* handlers that are not necessarily instances of [Document]. |