| OLD | NEW |
| 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 _wrapZone(callback(arg)) { | 7 _wrapZone(callback(arg)) { |
| 8 // For performance reasons avoid wrapping if we are in the root zone. | 8 // For performance reasons avoid wrapping if we are in the root zone. |
| 9 if (Zone.current == Zone.ROOT) return callback; | 9 if (Zone.current == Zone.ROOT) return callback; |
| 10 if (callback == null) return null; | 10 if (callback == null) return null; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 */ | 23 */ |
| 24 @deprecated | 24 @deprecated |
| 25 @Experimental() | 25 @Experimental() |
| 26 Element query(String relativeSelectors) => document.query(relativeSelectors); | 26 Element query(String relativeSelectors) => document.query(relativeSelectors); |
| 27 /** | 27 /** |
| 28 * Alias for [querySelectorAll]. Note this function is deprecated because its | 28 * Alias for [querySelectorAll]. Note this function is deprecated because its |
| 29 * semantics will be changing in the future. | 29 * semantics will be changing in the future. |
| 30 */ | 30 */ |
| 31 @deprecated | 31 @deprecated |
| 32 @Experimental() | 32 @Experimental() |
| 33 ElementList queryAll(String relativeSelectors) => document.queryAll(relativeSele
ctors); | 33 ElementList<Element> queryAll(String relativeSelectors) => document.queryAll(rel
ativeSelectors); |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * Finds the first descendant element of this document that matches the | 36 * Finds the first descendant element of this document that matches the |
| 37 * specified group of selectors. | 37 * specified group of selectors. |
| 38 * | 38 * |
| 39 * Unless your webpage contains multiple documents, the top-level | 39 * Unless your webpage contains multiple documents, the top-level |
| 40 * [querySelector] | 40 * [querySelector] |
| 41 * method behaves the same as this method, so you should use it instead to | 41 * method behaves the same as this method, so you should use it instead to |
| 42 * save typing a few characters. | 42 * save typing a few characters. |
| 43 * | 43 * |
| (...skipping 16 matching lines...) Expand all Loading... |
| 60 * method behaves the same as this method, so you should use it instead to | 60 * method behaves the same as this method, so you should use it instead to |
| 61 * save typing a few characters. | 61 * save typing a few characters. |
| 62 * | 62 * |
| 63 * [selectors] should be a string using CSS selector syntax. | 63 * [selectors] should be a string using CSS selector syntax. |
| 64 * | 64 * |
| 65 * var items = document.querySelectorAll('.itemClassName'); | 65 * var items = document.querySelectorAll('.itemClassName'); |
| 66 * | 66 * |
| 67 * For details about CSS selector syntax, see the | 67 * For details about CSS selector syntax, see the |
| 68 * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). | 68 * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). |
| 69 */ | 69 */ |
| 70 ElementList querySelectorAll(String selectors) => document.querySelectorAll(sele
ctors); | 70 ElementList<Element> querySelectorAll(String selectors) => document.querySelecto
rAll(selectors); |
| 71 | 71 |
| 72 /// A utility for changing the Dart wrapper type for elements. | 72 /// A utility for changing the Dart wrapper type for elements. |
| 73 abstract class ElementUpgrader { | 73 abstract class ElementUpgrader { |
| 74 /// Upgrade the specified element to be of the Dart type this was created for. | 74 /// Upgrade the specified element to be of the Dart type this was created for. |
| 75 /// | 75 /// |
| 76 /// After upgrading the element passed in is invalid and the returned value | 76 /// After upgrading the element passed in is invalid and the returned value |
| 77 /// should be used instead. | 77 /// should be used instead. |
| 78 Element upgrade(Element element); | 78 Element upgrade(Element element); |
| 79 } | 79 } |
| OLD | NEW |