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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

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:
Download patch
« no previous file with comments | « no previous file | tests/html/node_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 9e734b8053de22a76cc226361806fee536a53b6a..4e8149b3276f24f18287948ac435541ad998752b 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -17400,12 +17400,12 @@ class _ChildNodeListLazy implements List {
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;
}
@@ -17413,7 +17413,7 @@ class _ChildNodeListLazy implements List {
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);
}
Node min([int compare(Node a, Node b)]) {
« no previous file with comments | « no previous file | tests/html/node_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698