| 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 class $CLASSNAME extends _NodeImpl implements Document | 5 class $CLASSNAME extends _NodeImpl implements Document |
| 6 $if FROG | 6 $if DART2JS |
| 7 native "*HTMLDocument" | 7 native "*HTMLDocument" |
| 8 $endif | 8 $endif |
| 9 { | 9 { |
| 10 | 10 |
| 11 $!MEMBERS | 11 $!MEMBERS |
| 12 // TODO(jacobr): implement all Element methods not on Document. | 12 // TODO(jacobr): implement all Element methods not on Document. |
| 13 | 13 |
| 14 _ElementImpl query(String selectors) { | 14 _ElementImpl query(String selectors) { |
| 15 // It is fine for our RegExp to detect element id query selectors to have | 15 // It is fine for our RegExp to detect element id query selectors to have |
| 16 // false negatives but not false positives. | 16 // false negatives but not false positives. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 36 final copyOfMatches = new List<Element>(len); | 36 final copyOfMatches = new List<Element>(len); |
| 37 for (int i = 0; i < len; ++i) { | 37 for (int i = 0; i < len; ++i) { |
| 38 copyOfMatches[i] = mutableMatches[i]; | 38 copyOfMatches[i] = mutableMatches[i]; |
| 39 } | 39 } |
| 40 return new _FrozenElementList._wrap(copyOfMatches); | 40 return new _FrozenElementList._wrap(copyOfMatches); |
| 41 } else { | 41 } else { |
| 42 return new _FrozenElementList._wrap($dom_querySelectorAll(selectors)); | 42 return new _FrozenElementList._wrap($dom_querySelectorAll(selectors)); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 } | 45 } |
| OLD | NEW |