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

Side by Side Diff: sdk/lib/svg/dartium/svg_dartium.dart

Issue 11413071: Deprecating Element.elements for Element.children. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporating review feedback. Created 8 years, 1 month 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 library svg; 1 library svg;
2 2
3 import 'dart:html'; 3 import 'dart:html';
4 import 'dart:nativewrappers'; 4 import 'dart:nativewrappers';
5 // DO NOT EDIT 5 // DO NOT EDIT
6 // Auto-generated dart:svg library. 6 // Auto-generated dart:svg library.
7 7
8 8
9 9
10 10
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 } 1431 }
1432 1432
1433 List<Element> get elements => new FilteredElementList(this); 1433 List<Element> get elements => new FilteredElementList(this);
1434 1434
1435 void set elements(Collection<Element> value) { 1435 void set elements(Collection<Element> value) {
1436 final elements = this.elements; 1436 final elements = this.elements;
1437 elements.clear(); 1437 elements.clear();
1438 elements.addAll(value); 1438 elements.addAll(value);
1439 } 1439 }
1440 1440
1441 List<Element> get children => new FilteredElementList(this);
1442
1443 void set children(Collection<Element> value) {
1444 final children = this.children;
1445 children.clear();
1446 children.addAll(value);
1447 }
1448
1441 String get outerHTML { 1449 String get outerHTML {
1442 final container = new Element.tag("div"); 1450 final container = new Element.tag("div");
1443 final SVGElement cloned = this.clone(true); 1451 final SVGElement cloned = this.clone(true);
1444 container.elements.add(cloned); 1452 container.children.add(cloned);
1445 return container.innerHTML; 1453 return container.innerHTML;
1446 } 1454 }
1447 1455
1448 String get innerHTML { 1456 String get innerHTML {
1449 final container = new Element.tag("div"); 1457 final container = new Element.tag("div");
1450 final SVGElement cloned = this.clone(true); 1458 final SVGElement cloned = this.clone(true);
1451 container.elements.addAll(cloned.elements); 1459 container.children.addAll(cloned.children);
1452 return container.innerHTML; 1460 return container.innerHTML;
1453 } 1461 }
1454 1462
1455 void set innerHTML(String svg) { 1463 void set innerHTML(String svg) {
1456 final container = new Element.tag("div"); 1464 final container = new Element.tag("div");
1457 // Wrap the SVG string in <svg> so that SVGElements are created, rather than 1465 // Wrap the SVG string in <svg> so that SVGElements are created, rather than
1458 // HTMLElements. 1466 // HTMLElements.
1459 container.innerHTML = '<svg version="1.1">$svg</svg>'; 1467 container.innerHTML = '<svg version="1.1">$svg</svg>';
1460 this.elements = container.elements[0].elements; 1468 this.children = container.children[0].children;
1461 } 1469 }
1462 1470
1463 SVGElement.internal(): super.internal(); 1471 SVGElement.internal(): super.internal();
1464 1472
1465 1473
1466 /** @domName SVGElement.id */ 1474 /** @domName SVGElement.id */
1467 String get id native "SVGElement_id_Getter"; 1475 String get id native "SVGElement_id_Getter";
1468 1476
1469 1477
1470 /** @domName SVGElement.id */ 1478 /** @domName SVGElement.id */
(...skipping 6602 matching lines...) Expand 10 before | Expand all | Expand 10 after
8073 List<SVGElementInstance> getRange(int start, int rangeLength) => 8081 List<SVGElementInstance> getRange(int start, int rangeLength) =>
8074 _Lists.getRange(this, start, rangeLength, <SVGElementInstance>[]); 8082 _Lists.getRange(this, start, rangeLength, <SVGElementInstance>[]);
8075 8083
8076 // -- end List<SVGElementInstance> mixins. 8084 // -- end List<SVGElementInstance> mixins.
8077 8085
8078 8086
8079 /** @domName SVGElementInstanceList.item */ 8087 /** @domName SVGElementInstanceList.item */
8080 SVGElementInstance item(int index) native "SVGElementInstanceList_item_Callbac k"; 8088 SVGElementInstance item(int index) native "SVGElementInstanceList_item_Callbac k";
8081 8089
8082 } 8090 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698