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

Side by Side Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 12188017: Fixing element_types_test/supported_object (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated 7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated
8 // functionality. 8 // functionality.
9 class _ChildrenElementList implements List { 9 class _ChildrenElementList implements List {
10 // Raw Element. 10 // Raw Element.
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 if (list.length == 1) return list[0]; 1021 if (list.length == 1) return list[0];
1022 throw new ArgumentError('HTML had ${list.length} ' 1022 throw new ArgumentError('HTML had ${list.length} '
1023 'top level elements but 1 expected'); 1023 'top level elements but 1 expected');
1024 } 1024 }
1025 1025
1026 @DomName('Document.createElement') 1026 @DomName('Document.createElement')
1027 $if DART2JS 1027 $if DART2JS
1028 // Optimization to improve performance until the dart2js compiler inlines this 1028 // Optimization to improve performance until the dart2js compiler inlines this
1029 // method. 1029 // method.
1030 static dynamic createElement_tag(String tag) => 1030 static dynamic createElement_tag(String tag) =>
1031 JS('Element', 'document.createElement(#)', tag); 1031 JS('Element|Function', 'document.createElement(#)', tag);
sra1 2013/02/04 22:46:37 I'd write // Firefox may return a JavaScript func
1032 $else 1032 $else
1033 static Element createElement_tag(String tag) => 1033 static Element createElement_tag(String tag) =>
1034 document.$dom_createElement(tag); 1034 document.$dom_createElement(tag);
1035 $endif 1035 $endif
1036 } 1036 }
OLDNEW
« sdk/lib/html/dartium/html_dartium.dart ('K') | « tools/dom/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698