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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 264903005: [dart:html] rename custom elements callbacks to match spec (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a3a160895b985c24fab87c46c58108b6397d9357..bb00f1769cfd353a1dcabd840e22c8bbc6957e71 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -9694,15 +9694,39 @@ abstract class Element extends Node implements GlobalEventHandlers, ParentNode,
/**
* Called by the DOM when this element has been inserted into the live
* document.
+ *
+ * More information can be found in the
+ * [Custom Elements](http://w3c.github.io/webcomponents/spec/custom/#dfn-attached-callback)
+ * draft specification.
*/
@Experimental()
- void enteredView() {}
+ void attached() {
+ // For the deprecation period, call the old callback.
+ enteredView();
+ }
/**
* Called by the DOM when this element has been removed from the live
* document.
+ *
+ * More information can be found in the
+ * [Custom Elements](http://w3c.github.io/webcomponents/spec/custom/#dfn-detached-callback)
+ * draft specification.
*/
@Experimental()
+ void detached() {
+ // For the deprecation period, call the old callback.
+ leftView();
+ }
+
+ /** *Deprecated*: override [attached] instead. */
+ @Experimental()
+ @deprecated
+ void enteredView() {}
+
+ /** *Deprecated*: override [detached] instead. */
+ @Experimental()
+ @deprecated
void leftView() {}
/**
@@ -35209,12 +35233,12 @@ _callConstructor(constructor, interceptor) {
};
}
-_callEnteredView(receiver) {
- return receiver.enteredView();
+_callAttached(receiver) {
+ return receiver.attached();
}
-_callLeftView(receiver) {
- return receiver.leftView();
+_callDetached(receiver) {
+ return receiver.detached();
}
_callAttributeChanged(receiver, name, oldValue, newValue) {
return receiver.attributeChanged(name, oldValue, newValue);
@@ -35297,9 +35321,9 @@ void _registerCustomElement(context, document, String tag, Type type,
JS('=Object', '{value: #}',
_makeCallbackMethod(_callConstructor(constructor, interceptor))));
JS('void', '#.attachedCallback = #', properties,
- JS('=Object', '{value: #}', _makeCallbackMethod(_callEnteredView)));
+ JS('=Object', '{value: #}', _makeCallbackMethod(_callAttached)));
JS('void', '#.detachedCallback = #', properties,
- JS('=Object', '{value: #}', _makeCallbackMethod(_callLeftView)));
+ JS('=Object', '{value: #}', _makeCallbackMethod(_callDetached)));
JS('void', '#.attributeChangedCallback = #', properties,
JS('=Object', '{value: #}', _makeCallbackMethod3(_callAttributeChanged)));
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698