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

Side by Side Diff: lib/html/src/DocumentFragmentWrappingImplementation.dart

Issue 10868026: Adding .toggle method to Element.classes to match the JS element.classList.toggle method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporating review feedback. Created 8 years, 3 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
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | lib/html/src/SVGElementWrappingImplementation.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 class FilteredElementList implements ElementList { 5 class FilteredElementList implements ElementList {
6 final Node _node; 6 final Node _node;
7 final NodeList _childNodes; 7 final NodeList _childNodes;
8 8
9 FilteredElementList(Node node): _childNodes = node.nodes, _node = node; 9 FilteredElementList(Node node): _childNodes = node.nodes, _node = node;
10 10
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 String get title() => ""; 281 String get title() => "";
282 String get tagName() => ""; 282 String get tagName() => "";
283 String get webkitdropzone() => ""; 283 String get webkitdropzone() => "";
284 Element get firstElementChild() => elements.first(); 284 Element get firstElementChild() => elements.first();
285 Element get lastElementChild() => elements.last(); 285 Element get lastElementChild() => elements.last();
286 Element get nextElementSibling() => null; 286 Element get nextElementSibling() => null;
287 Element get previousElementSibling() => null; 287 Element get previousElementSibling() => null;
288 Element get offsetParent() => null; 288 Element get offsetParent() => null;
289 Element get parent() => null; 289 Element get parent() => null;
290 Map<String, String> get attributes() => const {}; 290 Map<String, String> get attributes() => const {};
291 // Issue 174: this should be a const set. 291 CSSClassSet get classes() => null;
292 Set<String> get classes() => new Set<String>();
293 Map<String, String> get dataAttributes() => const {}; 292 Map<String, String> get dataAttributes() => const {};
294 CSSStyleDeclaration get style() => new EmptyStyleDeclaration(); 293 CSSStyleDeclaration get style() => new EmptyStyleDeclaration();
295 Future<CSSStyleDeclaration> get computedStyle() => 294 Future<CSSStyleDeclaration> get computedStyle() =>
296 _emptyStyleFuture(); 295 _emptyStyleFuture();
297 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) => 296 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) =>
298 _emptyStyleFuture(); 297 _emptyStyleFuture();
299 bool matchesSelector([String selectors]) => false; 298 bool matchesSelector([String selectors]) => false;
300 299
301 // Imperative Element methods are made into no-ops, as they are on parentless 300 // Imperative Element methods are made into no-ops, as they are on parentless
302 // elements. 301 // elements.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 "Title can't be set for document fragments."); 387 "Title can't be set for document fragments.");
389 } 388 }
390 389
391 void set webkitdropzone(String value) { 390 void set webkitdropzone(String value) {
392 throw new UnsupportedOperationException( 391 throw new UnsupportedOperationException(
393 "WebKit drop zone can't be set for document fragments."); 392 "WebKit drop zone can't be set for document fragments.");
394 } 393 }
395 394
396 DocumentFragment clone(bool deep) => super.clone(deep); 395 DocumentFragment clone(bool deep) => super.clone(deep);
397 } 396 }
OLDNEW
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | lib/html/src/SVGElementWrappingImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698