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

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

Issue 22957010: Revert "Adding polyfill support for custom elements." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | tools/dom/src/dart2js_Platform.dart » ('j') | 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 _callOnCreated(receiver) { 7 _callOnCreated(receiver) {
8 return receiver.onCreated(); 8 return receiver.onCreated();
9 } 9 }
10 10
(...skipping 27 matching lines...) Expand all
38 throw new ArgumentError(type); 38 throw new ArgumentError(type);
39 } 39 }
40 40
41 String baseClassName = findDispatchTagForInterceptorClass(interceptorClass); 41 String baseClassName = findDispatchTagForInterceptorClass(interceptorClass);
42 if (baseClassName == null) { 42 if (baseClassName == null) {
43 throw new ArgumentError(type); 43 throw new ArgumentError(type);
44 } 44 }
45 if (baseClassName == 'Element') baseClassName = 'HTMLElement'; 45 if (baseClassName == 'Element') baseClassName = 'HTMLElement';
46 46
47 var baseConstructor = JS('=Object', '#[#]', context, baseClassName); 47 var baseConstructor = JS('=Object', '#[#]', context, baseClassName);
48 if (JS('bool', "typeof(#) != 'function'", baseConstructor)) {
49 throw new ArgumentError(type);
50 }
48 51
49 var properties = JS('=Object', '{}'); 52 var properties = JS('=Object', '{}');
50 53
51 var jsCreatedCallback = _makeCreatedCallbackMethod(); 54 var jsCreatedCallback = _makeCreatedCallbackMethod();
52 55
53 JS('void', '#.createdCallback = #', properties, 56 JS('void', '#.createdCallback = #', properties,
54 JS('=Object', '{value: #}', jsCreatedCallback)); 57 JS('=Object', '{value: #}', jsCreatedCallback));
55 58
56 var baseProto = JS('=Object', '#.prototype', baseConstructor); 59 var baseProto = JS('=Object', '#.prototype', baseConstructor);
57 var proto = JS('=Object', 'Object.create(#, #)', baseProto, properties); 60 var proto = JS('=Object', 'Object.create(#, #)', baseProto, properties);
58 61
59 var interceptor = JS('=Object', '#.prototype', interceptorClass); 62 var interceptor = JS('=Object', '#.prototype', interceptorClass);
60 63
61 setNativeSubclassDispatchRecord(proto, interceptor); 64 setNativeSubclassDispatchRecord(proto, interceptor);
62 65
63 JS('void', '#.register(#, #)', 66 JS('void', '#.register(#, #)',
64 document, tag, JS('', '{prototype: #}', proto)); 67 document, tag, JS('', '{prototype: #}', proto));
65 } 68 }
OLDNEW
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | tools/dom/src/dart2js_Platform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698