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

Unified Diff: tools/dom/templates/html/impl/impl_Node.darttemplate

Issue 12513010: Fixing Node.nodes.first. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/node_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_Node.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Node.darttemplate b/tools/dom/templates/html/impl/impl_Node.darttemplate
index 94b84dce0724f6771333329de7325d0ad80ec3a8..018494ddb89ba8e50aa696314c3b2b2baec666fa 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -17,12 +17,12 @@ class _ChildNodeListLazy implements List {
$if DART2JS
Node get first {
- Node result = JS('Node', '#.firstChild', _this);
+ Node result = JS('Node|Null', '#.firstChild', _this);
if (result == null) throw new StateError("No elements");
return result;
}
Node get last {
- Node result = JS('Node', '#.lastChild', _this);
+ Node result = JS('Node|Null', '#.lastChild', _this);
if (result == null) throw new StateError("No elements");
return result;
}
@@ -30,7 +30,7 @@ $if DART2JS
int l = this.length;
if (l == 0) throw new StateError("No elements");
if (l > 1) throw new StateError("More than one element");
- return JS('Node', '#.firstChild', _this);
+ return JS('Node|Null', '#.firstChild', _this);
}
$else
Node get first {
« no previous file with comments | « tests/html/node_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698