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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/custom/attribute_changed_callback_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 516e9b9e44b2f76b075234468ef6b8590df72f2a..33f066392fb0a915843fa7520b7399d85b56c693 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -7930,11 +7930,15 @@ class Document extends Node
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 true;
}
+ /// *Deprecated*: use [supportsRegisterElement] instead.
+ @deprecated
+ bool get supportsRegister => supportsRegisterElement;
+
@DomName('Document.createElement')
Element createElement(String tagName, [String typeExtension]) {
if (typeExtension != null) {
@@ -9492,7 +9496,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
@@ -14347,7 +14351,7 @@ class HtmlDocument extends Document {
* }
*
* main() {
- * document.register('x-foo', FooElement);
+ * document.registerElement('x-foo', FooElement);
* var myFoo = new Element.tag('x-foo');
* // prints 'FooElement created!' to the console.
* }
@@ -14364,7 +14368,7 @@ class HtmlDocument extends Document {
* }
*
* 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.
* }
@@ -14373,10 +14377,18 @@ class HtmlDocument extends Document {
* `<input is="x-bar"></input>`
*
*/
- void register(String tag, Type customElementClass, {String extendsTag}) {
+ void registerElement(String tag, Type customElementClass,
+ {String extendsTag}) {
_Utils.register(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].
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/custom/attribute_changed_callback_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698