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

Unified Diff: sdk/lib/html/templates/immutable_list_mixin.darttemplate

Issue 11316059: Add List.first. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add dart2js interceptor and add test. 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 | « sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate ('k') | sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/templates/immutable_list_mixin.darttemplate
diff --git a/sdk/lib/html/templates/immutable_list_mixin.darttemplate b/sdk/lib/html/templates/immutable_list_mixin.darttemplate
index b6a4b8bdb12c745d1e0689bce45b716ac2215ab2..43479e4864bd8adadc80ae71ad231d7864f93882 100644
--- a/sdk/lib/html/templates/immutable_list_mixin.darttemplate
+++ b/sdk/lib/html/templates/immutable_list_mixin.darttemplate
@@ -57,6 +57,8 @@ $endif
return _Lists.lastIndexOf(this, element, start);
}
+ $E get first => this[0];
+
$E get last => this[length - 1];
$E removeLast() {
« no previous file with comments | « sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate ('k') | sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698