OLD | NEW |
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 html; |
| 6 |
5 // TODO(jacobr): use _Lists.dart to remove some of the duplicated | 7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated |
6 // functionality. | 8 // functionality. |
7 class _ChildrenElementList implements List { | 9 class _ChildrenElementList implements List { |
8 // Raw Element. | 10 // Raw Element. |
9 final Element _element; | 11 final Element _element; |
10 final HTMLCollection _childElements; | 12 final HTMLCollection _childElements; |
11 | 13 |
12 _ChildrenElementList._wrap(Element element) | 14 _ChildrenElementList._wrap(Element element) |
13 : _childElements = element.$dom_children, | 15 : _childElements = element.$dom_children, |
14 _element = element; | 16 _element = element; |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 $if DART2JS | 947 $if DART2JS |
946 // Optimization to improve performance until the dart2js compiler inlines this | 948 // Optimization to improve performance until the dart2js compiler inlines this |
947 // method. | 949 // method. |
948 static Element createElement_tag(String tag) => | 950 static Element createElement_tag(String tag) => |
949 JS('Element', 'document.createElement(#)', tag); | 951 JS('Element', 'document.createElement(#)', tag); |
950 $else | 952 $else |
951 static Element createElement_tag(String tag) => | 953 static Element createElement_tag(String tag) => |
952 document.$dom_createElement(tag); | 954 document.$dom_createElement(tag); |
953 $endif | 955 $endif |
954 } | 956 } |
OLD | NEW |