| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // WARNING: Do not edit - generated code. | 5 // WARNING: Do not edit - generated code. |
| 6 | 6 |
| 7 // TODO(vsm): Eliminate this type. | 7 // TODO(vsm): Eliminate this type. |
| 8 | 8 |
| 9 // Note, ElementList implements List (instead of List<Element>) so | 9 // Note, ElementList implements List (instead of List<Element>) so |
| 10 // that its implementing classes may be cast to Lists of more specific | 10 // that its implementing classes may be cast to Lists of more specific |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 ClientRect get bounding(); | 40 ClientRect get bounding(); |
| 41 // In global coords | 41 // In global coords |
| 42 List<ClientRect> get clientRects(); | 42 List<ClientRect> get clientRects(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 interface NodeSelector { | 45 interface NodeSelector { |
| 46 Element query(String selectors); | 46 Element query(String selectors); |
| 47 List<Element> queryAll(String selectors); | 47 List<Element> queryAll(String selectors); |
| 48 } | 48 } |
| 49 | 49 |
| 50 interface CSSClassSet extends Set<String> { |
| 51 /** |
| 52 * Adds the class [token] to the element if it is not on it, removes it if it |
| 53 * is. |
| 54 */ |
| 55 bool toggle(String token); |
| 56 |
| 57 /** |
| 58 * Returns [:true:] classes cannot be added or removed from this |
| 59 * [:CSSClassSet:]. |
| 60 */ |
| 61 bool get isFrozen(); |
| 62 } |
| 63 |
| 50 $!COMMENT | 64 $!COMMENT |
| 51 interface Element extends Node, NodeSelector default _$(ID)FactoryProvider { | 65 interface Element extends Node, NodeSelector default _$(ID)FactoryProvider { |
| 52 Element.html(String html); | 66 Element.html(String html); |
| 53 Element.tag(String tag); | 67 Element.tag(String tag); |
| 54 | 68 |
| 55 AttributeMap get attributes(); | 69 AttributeMap get attributes(); |
| 56 void set attributes(Map<String, String> value); | 70 void set attributes(Map<String, String> value); |
| 57 | 71 |
| 58 /** | 72 /** |
| 59 * @domName childElementCount, firstElementChild, lastElementChild, | 73 * @domName childElementCount, firstElementChild, lastElementChild, |
| 60 * children, Node.nodes.add | 74 * children, Node.nodes.add |
| 61 */ | 75 */ |
| 62 ElementList get elements(); | 76 ElementList get elements(); |
| 63 | 77 |
| 64 void set elements(Collection<Element> value); | 78 void set elements(Collection<Element> value); |
| 65 | 79 |
| 66 /** @domName className, classList */ | 80 /** @domName className, classList */ |
| 67 Set<String> get classes(); | 81 CSSClassSet get classes(); |
| 68 | 82 |
| 69 void set classes(Collection<String> value); | 83 void set classes(Collection<String> value); |
| 70 | 84 |
| 71 AttributeMap get dataAttributes(); | 85 AttributeMap get dataAttributes(); |
| 72 void set dataAttributes(Map<String, String> value); | 86 void set dataAttributes(Map<String, String> value); |
| 73 | 87 |
| 74 /** | 88 /** |
| 75 * @domName getClientRects, getBoundingClientRect, clientHeight, clientWidth, | 89 * @domName getClientRects, getBoundingClientRect, clientHeight, clientWidth, |
| 76 * clientTop, clientLeft, offsetHeight, offsetWidth, offsetTop, offsetLeft, | 90 * clientTop, clientLeft, offsetHeight, offsetWidth, offsetTop, offsetLeft, |
| 77 * scrollHeight, scrollWidth, scrollTop, scrollLeft | 91 * scrollHeight, scrollWidth, scrollTop, scrollLeft |
| 78 */ | 92 */ |
| 79 Future<ElementRect> get rect(); | 93 Future<ElementRect> get rect(); |
| 80 | 94 |
| 81 /** @domName Window.getComputedStyle */ | 95 /** @domName Window.getComputedStyle */ |
| 82 Future<CSSStyleDeclaration> get computedStyle(); | 96 Future<CSSStyleDeclaration> get computedStyle(); |
| 83 | 97 |
| 84 /** @domName Window.getComputedStyle */ | 98 /** @domName Window.getComputedStyle */ |
| 85 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement); | 99 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement); |
| 86 | 100 |
| 87 Element clone(bool deep); | 101 Element clone(bool deep); |
| 88 | 102 |
| 89 Element get parent(); | 103 Element get parent(); |
| 90 | 104 |
| 91 $!MEMBERS | 105 $!MEMBERS |
| 92 } | 106 } |
| OLD | NEW |