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

Side by Side Diff: tools/dom/src/dart2js_CustomElementSupport.dart

Issue 40613002: Removing older lifecycle events (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.dom.html; 5 part of dart.dom.html;
6 6
7 _callConstructor(constructor, interceptor) { 7 _callConstructor(constructor, interceptor) {
8 return (receiver) { 8 return (receiver) {
9 setNativeSubclassDispatchRecord(receiver, interceptor); 9 setNativeSubclassDispatchRecord(receiver, interceptor);
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 JS('void', '#.createdCallback = #', properties, 99 JS('void', '#.createdCallback = #', properties,
100 JS('=Object', '{value: #}', 100 JS('=Object', '{value: #}',
101 _makeCallbackMethod(_callConstructor(constructor, interceptor)))); 101 _makeCallbackMethod(_callConstructor(constructor, interceptor))));
102 JS('void', '#.enteredViewCallback = #', properties, 102 JS('void', '#.enteredViewCallback = #', properties,
103 JS('=Object', '{value: #}', _makeCallbackMethod(_callEnteredView))); 103 JS('=Object', '{value: #}', _makeCallbackMethod(_callEnteredView)));
104 JS('void', '#.leftViewCallback = #', properties, 104 JS('void', '#.leftViewCallback = #', properties,
105 JS('=Object', '{value: #}', _makeCallbackMethod(_callLeftView))); 105 JS('=Object', '{value: #}', _makeCallbackMethod(_callLeftView)));
106 JS('void', '#.attributeChangedCallback = #', properties, 106 JS('void', '#.attributeChangedCallback = #', properties,
107 JS('=Object', '{value: #}', _makeCallbackMethod3(_callAttributeChanged))); 107 JS('=Object', '{value: #}', _makeCallbackMethod3(_callAttributeChanged)));
108 108
109 // TODO(blois): Bug 13220- remove once transition is complete
110 JS('void', '#.enteredDocumentCallback = #', properties,
111 JS('=Object', '{value: #}', _makeCallbackMethod(_callEnteredView)));
112 JS('void', '#.leftDocumentCallback = #', properties,
113 JS('=Object', '{value: #}', _makeCallbackMethod(_callLeftView)));
114
115 var baseProto = JS('=Object', '#.prototype', baseConstructor); 109 var baseProto = JS('=Object', '#.prototype', baseConstructor);
116 var proto = JS('=Object', 'Object.create(#, #)', baseProto, properties); 110 var proto = JS('=Object', 'Object.create(#, #)', baseProto, properties);
117 111
118 setNativeSubclassDispatchRecord(proto, interceptor); 112 setNativeSubclassDispatchRecord(proto, interceptor);
119 113
120 var options = JS('=Object', '{prototype: #}', proto); 114 var options = JS('=Object', '{prototype: #}', proto);
121 115
122 if (baseClassName != 'HTMLElement') { 116 if (baseClassName != 'HTMLElement') {
123 if (extendsTagName != null) { 117 if (extendsTagName != null) {
124 JS('=Object', '#.extends = #', options, extendsTagName); 118 JS('=Object', '#.extends = #', options, extendsTagName);
125 } 119 }
126 } 120 }
127 121
128 JS('void', '#.register(#, #)', document, tag, options); 122 JS('void', '#.register(#, #)', document, tag, options);
129 } 123 }
130 124
131 //// Called by Element.created to do validation & initialization. 125 //// Called by Element.created to do validation & initialization.
132 void _initializeCustomElement(Element e) { 126 void _initializeCustomElement(Element e) {
133 // TODO(blois): Add validation that this is only in response to an upgrade. 127 // TODO(blois): Add validation that this is only in response to an upgrade.
134 } 128 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698