OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 interface ElementList extends List<Element> { | |
6 // TODO(jacobr): add element batch manipulation methods. | |
7 ElementList filter(bool f(Element element)); | |
8 | |
9 ElementList getRange(int start, int length); | |
10 | |
11 Element get first(); | |
12 // TODO(jacobr): add insertAt | |
13 } | |
14 | |
15 class DeferredElementRect { | |
16 // TODO(jacobr) | |
17 } | |
18 | |
19 interface ElementEvents extends Events { | |
20 EventListenerList get abort(); | |
21 EventListenerList get beforeCopy(); | |
22 EventListenerList get beforeCut(); | |
23 EventListenerList get beforePaste(); | |
24 EventListenerList get blur(); | |
25 EventListenerList get change(); | |
26 EventListenerList get click(); | |
27 EventListenerList get contextMenu(); | |
28 EventListenerList get copy(); | |
29 EventListenerList get cut(); | |
30 EventListenerList get dblClick(); | |
31 EventListenerList get drag(); | |
32 EventListenerList get dragEnd(); | |
33 EventListenerList get dragEnter(); | |
34 EventListenerList get dragLeave(); | |
35 EventListenerList get dragOver(); | |
36 EventListenerList get dragStart(); | |
37 EventListenerList get drop(); | |
38 EventListenerList get error(); | |
39 EventListenerList get focus(); | |
40 EventListenerList get input(); | |
41 EventListenerList get invalid(); | |
42 EventListenerList get keyDown(); | |
43 EventListenerList get keyPress(); | |
44 EventListenerList get keyUp(); | |
45 EventListenerList get load(); | |
46 EventListenerList get mouseDown(); | |
47 EventListenerList get mouseMove(); | |
48 EventListenerList get mouseOut(); | |
49 EventListenerList get mouseOver(); | |
50 EventListenerList get mouseUp(); | |
51 EventListenerList get mouseWheel(); | |
52 EventListenerList get paste(); | |
53 EventListenerList get reset(); | |
54 EventListenerList get scroll(); | |
55 EventListenerList get search(); | |
56 EventListenerList get select(); | |
57 EventListenerList get selectStart(); | |
58 EventListenerList get submit(); | |
59 EventListenerList get touchCancel(); | |
60 EventListenerList get touchEnd(); | |
61 EventListenerList get touchLeave(); | |
62 EventListenerList get touchMove(); | |
63 EventListenerList get touchStart(); | |
64 EventListenerList get transitionEnd(); | |
65 EventListenerList get fullscreenChange(); | |
66 } | |
67 | |
68 /** | |
69 * All your element measurement needs in one place | |
70 */ | |
71 interface ElementRect { | |
72 ClientRect get client(); | |
73 ClientRect get offset(); | |
74 ClientRect get scroll(); | |
75 ClientRect get bounding(); | |
76 List<ClientRect> get clientRects(); | |
77 } | |
78 | |
79 | |
80 interface Element extends Node /*, common.NodeSelector, common.ElementTraversal
*/ | |
81 default ElementWrappingImplementation { | |
82 | |
83 Element.html(String html); | |
84 Element.tag(String tag); | |
85 | |
86 Map<String, String> get attributes(); | |
87 void set attributes(Map<String, String> value); | |
88 | |
89 ElementList get elements(); | |
90 | |
91 // TODO: The type of value should be Collection<Element>. See http://b/5392897 | |
92 void set elements(value); | |
93 | |
94 Set<String> get classes(); | |
95 | |
96 // TODO: The type of value should be Collection<String>. See http://b/5392897 | |
97 void set classes(value); | |
98 | |
99 Map<String, String> get dataAttributes(); | |
100 void set dataAttributes(Map<String, String> value); | |
101 | |
102 String get contentEditable(); | |
103 | |
104 void set contentEditable(String value); | |
105 | |
106 String get dir(); | |
107 | |
108 void set dir(String value); | |
109 | |
110 bool get draggable(); | |
111 | |
112 void set draggable(bool value); | |
113 | |
114 Element get firstElementChild(); | |
115 | |
116 bool get hidden(); | |
117 | |
118 void set hidden(bool value); | |
119 | |
120 String get id(); | |
121 | |
122 void set id(String value); | |
123 | |
124 String get innerHTML(); | |
125 | |
126 void set innerHTML(String value); | |
127 | |
128 bool get isContentEditable(); | |
129 | |
130 String get lang(); | |
131 | |
132 void set lang(String value); | |
133 | |
134 Element get lastElementChild(); | |
135 | |
136 Element get nextElementSibling(); | |
137 | |
138 Element get offsetParent(); | |
139 | |
140 String get outerHTML(); | |
141 | |
142 Element get previousElementSibling(); | |
143 | |
144 void set scrollLeft(int value); | |
145 | |
146 void set scrollTop(int value); | |
147 | |
148 bool get spellcheck(); | |
149 | |
150 void set spellcheck(bool value); | |
151 | |
152 CSSStyleDeclaration get style(); | |
153 | |
154 int get tabIndex(); | |
155 | |
156 void set tabIndex(int value); | |
157 | |
158 String get tagName(); | |
159 | |
160 String get title(); | |
161 | |
162 void set title(String value); | |
163 | |
164 String get webkitdropzone(); | |
165 | |
166 void set webkitdropzone(String value); | |
167 | |
168 void blur(); | |
169 | |
170 void focus(); | |
171 | |
172 Element insertAdjacentElement([String where, Element element]); | |
173 | |
174 void insertAdjacentHTML([String position_OR_where, String text]); | |
175 | |
176 void insertAdjacentText([String where, String text]); | |
177 | |
178 Element query(String selectors); | |
179 | |
180 ElementList queryAll(String selectors); | |
181 | |
182 Element get parent(); | |
183 | |
184 void scrollByLines([int lines]); | |
185 | |
186 void scrollByPages([int pages]); | |
187 | |
188 void scrollIntoView([bool centerIfNeeded]); | |
189 | |
190 bool matchesSelector([String selectors]); | |
191 | |
192 Future<ElementRect> get rect(); | |
193 | |
194 Future<CSSStyleDeclaration> get computedStyle(); | |
195 | |
196 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement); | |
197 | |
198 ElementEvents get on(); | |
199 | |
200 Element clone(bool deep); | |
201 } | |
OLD | NEW |