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

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

Issue 90113002: fix custom elements that extend tags like "section" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: revert whitespace changes Created 7 years 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 | « tests/html/custom/constructor_calls_created_synchronously_test.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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 var baseProto = JS('=Object', '#.prototype', baseConstructor); 109 var baseProto = JS('=Object', '#.prototype', baseConstructor);
110 var proto = JS('=Object', 'Object.create(#, #)', baseProto, properties); 110 var proto = JS('=Object', 'Object.create(#, #)', baseProto, properties);
111 111
112 setNativeSubclassDispatchRecord(proto, interceptor); 112 setNativeSubclassDispatchRecord(proto, interceptor);
113 113
114 var options = JS('=Object', '{prototype: #}', proto); 114 var options = JS('=Object', '{prototype: #}', proto);
115 115
116 if (baseClassName != 'HTMLElement') { 116 if (extendsTagName != null) {
117 if (extendsTagName != null) { 117 JS('=Object', '#.extends = #', options, extendsTagName);
118 JS('=Object', '#.extends = #', options, extendsTagName);
119 }
120 } 118 }
121 119
122 JS('void', '#.register(#, #)', document, tag, options); 120 JS('void', '#.register(#, #)', document, tag, options);
123 } 121 }
124 122
125 //// Called by Element.created to do validation & initialization. 123 //// Called by Element.created to do validation & initialization.
126 void _initializeCustomElement(Element e) { 124 void _initializeCustomElement(Element e) {
127 // TODO(blois): Add validation that this is only in response to an upgrade. 125 // TODO(blois): Add validation that this is only in response to an upgrade.
128 } 126 }
OLDNEW
« no previous file with comments | « tests/html/custom/constructor_calls_created_synchronously_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698