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

Unified Diff: samples/newissues/newissues.dart

Issue 11413071: Deprecating Element.elements for Element.children. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/logo/logo.dart ('k') | samples/swipe/swipe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/newissues/newissues.dart
diff --git a/samples/newissues/newissues.dart b/samples/newissues/newissues.dart
index 22a5a03e78720d712fa2189d6572b5529b97f72c..99b0f3ce4352a240e5ecae7ac451e06981127c31 100644
--- a/samples/newissues/newissues.dart
+++ b/samples/newissues/newissues.dart
@@ -11,15 +11,15 @@ class Issue {
Issue(this.json);
void addTo(Element div) {
- div.elements.add(new Element.tag("h2")..text = json[r"title"][r"$t"]);
- div.elements.add(new Element.tag("pre")..text = json[r"content"][r"$t"]);
+ div.children.add(new Element.tag("h2")..text = json[r"title"][r"$t"]);
+ div.children.add(new Element.tag("pre")..text = json[r"content"][r"$t"]);
}
}
/// Decodes JSON into a list of Issues.
List<Issue> getIssues(json) {
var issues = json["feed"]["entry"];
- if (issues == null) return null;
+ if (issues == null) return null;
return issues.map((data) => new Issue(data));
}
@@ -28,7 +28,7 @@ void processJson(json) {
Element div = query("#content");
List<Issue> list = getIssues(json);
if (list == null) {
- div.elements.add(new Element.tag("h2")..text = "... no issues found.");
+ div.children.add(new Element.tag("h2")..text = "... no issues found.");
} else {
getIssues(json).forEach((Issue i) => i.addTo(div));
}
« no previous file with comments | « samples/logo/logo.dart ('k') | samples/swipe/swipe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698