Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(735)

Side by Side Diff: client/dom/templates/html/interface/interface_Element.darttemplate

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 /** 7 /**
8 * Provides a Map abstraction on top of data-* attributes, similar to the 8 * Provides a Map abstraction on top of data-* attributes, similar to the
9 * dataSet in the old DOM. 9 * dataSet in the old DOM.
10 */ 10 */
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 bool isEmpty() => length == 0; 77 bool isEmpty() => length == 0;
78 78
79 // Helpers. 79 // Helpers.
80 String _attr(String key) => 'data-$key'; 80 String _attr(String key) => 'data-$key';
81 bool _matches(String key) => key.startsWith('data-'); 81 bool _matches(String key) => key.startsWith('data-');
82 String _strip(String key) => key.substring(5); 82 String _strip(String key) => key.substring(5);
83 } 83 }
84 84
85 class _CssClassSet implements Set<String> { 85 class _CssClassSet implements Set<String> {
86 86
87 final _ElementJs _element; 87 final _ElementImpl _element;
88 88
89 _CssClassSet(this._element); 89 _CssClassSet(this._element);
90 90
91 String toString() { 91 String toString() {
92 return _formatSet(_read()); 92 return _formatSet(_read());
93 } 93 }
94 94
95 // interface Iterable - BEGIN 95 // interface Iterable - BEGIN
96 Iterator<String> iterator() { 96 Iterator<String> iterator() {
97 return _read().iterator(); 97 return _read().iterator();
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // Relative to offsetParent 241 // Relative to offsetParent
242 ClientRect get client(); 242 ClientRect get client();
243 ClientRect get offset(); 243 ClientRect get offset();
244 ClientRect get scroll(); 244 ClientRect get scroll();
245 // In global coords 245 // In global coords
246 ClientRect get bounding(); 246 ClientRect get bounding();
247 // In global coords 247 // In global coords
248 List<ClientRect> get clientRects(); 248 List<ClientRect> get clientRects();
249 } 249 }
250 250
251 // TODO(jacobr): referencing _ElementJs here is problematic when we need 251 interface Element extends Node, NodeSelector default _$(ID)FactoryProvider {
252 // to support wrappers as well.
253 interface Element extends Node, NodeSelector default _ElementJs {
254 // TODO(jacobr): switch back to: 252 // TODO(jacobr): switch back to:
255 // interface $ID$EXTENDS default _ElementJs { 253 // interface $ID$EXTENDS default _ElementImpl {
256 Element.html(String html); 254 Element.html(String html);
257 Element.tag(String tag); 255 Element.tag(String tag);
258 256
259 Map<String, String> get attributes(); 257 Map<String, String> get attributes();
260 void set attributes(Map<String, String> value); 258 void set attributes(Map<String, String> value);
261 259
260 /**
261 * @domName querySelectorAll, getElementsByClassName, getElementsByTagName,
262 * getElementsByTagNameNS
263 */
264 ElementList queryAll(String selectors);
265
262 // TODO(jacobr): remove these methods and let them be generated automatically 266 // TODO(jacobr): remove these methods and let them be generated automatically
263 // once dart supports defining fields with the same name in an interface and 267 // once dart supports defining fields with the same name in an interface and
264 // its parent interface. 268 // its parent interface.
265 String get title(); 269 String get title();
266 void set title(String value); 270 void set title(String value);
267 271
272 /**
273 * @domName childElementCount, firstElementChild, lastElementChild,
274 * children, Node.nodes.add
275 */
268 ElementList get elements(); 276 ElementList get elements();
269 277
270 // TODO: The type of value should be Collection<Element>. See http://b/5392897 278 // TODO: The type of value should be Collection<Element>. See http://b/5392897
271 void set elements(value); 279 void set elements(value);
272 280
273 Element query(String selectors); 281 /** @domName className, classList */
274
275 ElementList queryAll(String selectors);
276
277 Set<String> get classes(); 282 Set<String> get classes();
278 283
279 // TODO: The type of value should be Collection<String>. See http://b/5392897 284 // TODO: The type of value should be Collection<String>. See http://b/5392897
280 void set classes(value); 285 void set classes(value);
281 286
282 Map<String, String> get dataAttributes(); 287 Map<String, String> get dataAttributes();
283 void set dataAttributes(Map<String, String> value); 288 void set dataAttributes(Map<String, String> value);
284 289
285 bool matchesSelector([String selectors]); 290 /**
286 291 * @domName getClientRects, getBoundingClientRect, clientHeight, clientWidth,
292 * clientTop, clientLeft, offsetHeight, offsetWidth, offsetTop, offsetLeft,
293 * scrollHeight, scrollWidth, scrollTop, scrollLeft
294 */
287 Future<ElementRect> get rect(); 295 Future<ElementRect> get rect();
288 296
297 /** @domName Window.getComputedStyle */
289 Future<CSSStyleDeclaration> get computedStyle(); 298 Future<CSSStyleDeclaration> get computedStyle();
290 299
300 /** @domName Window.getComputedStyle */
291 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement); 301 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement);
292 302
293 Element clone(bool deep); 303 Element clone(bool deep);
294 304
295
296 Element get parent(); 305 Element get parent();
297 306
298 $!MEMBERS 307 $!MEMBERS
299 } 308 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698