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

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

Issue 24251016: Revert "Dart2js support for custom element lifecycle events" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | « pkg/shadow_dom/tool/build/if-poly.js ('k') | 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 4e97d224d149db9b75e12b1f3f1e3a3061e3ec1c..2f2259cf9ce82311f99182db49eab18d87e5dcf4 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -9146,20 +9146,6 @@ abstract class Element extends Node implements ParentNode, ChildNode native "Ele
@Experimental()
void created() {}
- /**
- * Called by the DOM when this element has been inserted into the live
- * document.
- */
- @Experimental()
- void enteredView() {}
-
- /**
- * Called by the DOM when this element has been removed from the live
- * document.
- */
- @Experimental()
- void leftView() {}
-
// Hooks to support custom WebComponents.
@Creates('Null') // Set from Dart code; does not instantiate a native type.
@@ -32051,22 +32037,14 @@ _callCreated(receiver) {
return receiver.created();
}
-_callEnteredView(receiver) {
- return receiver.enteredView();
-}
-
-_callLeftView(receiver) {
- return receiver.leftView();
-}
-
-_makeCallbackMethod(callback) {
+_makeCreatedCallbackMethod() {
return JS('',
'''((function(invokeCallback) {
return function() {
return invokeCallback(this);
};
})(#))''',
- convertDartClosureToJS(callback, 1));
+ convertDartClosureToJS(_callCreated, 1));
}
const _typeNameToTag = const {
@@ -32128,18 +32106,10 @@ void _registerCustomElement(context, document, String tag, Type type,
var properties = JS('=Object', '{}');
+ var jsCreatedCallback = _makeCreatedCallbackMethod();
+
JS('void', '#.createdCallback = #', properties,
- JS('=Object', '{value: #}', _makeCallbackMethod(_callCreated)));
- JS('void', '#.enteredViewCallback = #', properties,
- JS('=Object', '{value: #}', _makeCallbackMethod(_callEnteredView)));
- JS('void', '#.leftViewCallback = #', properties,
- JS('=Object', '{value: #}', _makeCallbackMethod(_callLeftView)));
-
- // TODO(blois): Bug 13220- remove once transition is complete
- JS('void', '#.enteredDocumentCallback = #', properties,
- JS('=Object', '{value: #}', _makeCallbackMethod(_callEnteredView)));
- JS('void', '#.leftDocumentCallback = #', properties,
- JS('=Object', '{value: #}', _makeCallbackMethod(_callLeftView)));
+ JS('=Object', '{value: #}', jsCreatedCallback));
var baseProto = JS('=Object', '#.prototype', baseConstructor);
var proto = JS('=Object', 'Object.create(#, #)', baseProto, properties);
« no previous file with comments | « pkg/shadow_dom/tool/build/if-poly.js ('k') | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698