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

Side by Side Diff: utils/tests/template/sample.dart

Issue 11358145: Update utils to new library syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « utils/tests/template/real_app.dart ('k') | utils/tests/template/test_complex.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #import('dart:html'); 5 import 'dart:html';
6 6
7 // Utility functions: 7 // Utility functions:
8 String safeHTML(String value) { 8 String safeHTML(String value) {
9 // TODO(terry): TBD 9 // TODO(terry): TBD
10 return value; 10 return value;
11 } 11 }
12 12
13 /* Data Model */ 13 /* Data Model */
14 class Friend { 14 class Friend {
15 String name; 15 String name;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 document.body.elements.add(clickableFriend.root); 234 document.body.elements.add(clickableFriend.root);
235 clickableFriend.friendElem.on.click.add((e) { 235 clickableFriend.friendElem.on.click.add((e) {
236 var elemStyle = e.srcElement.style; 236 var elemStyle = e.srcElement.style;
237 String toggleColor = elemStyle.getPropertyValue("background-color") == "red" ? "white" : "red"; 237 String toggleColor = elemStyle.getPropertyValue("background-color") == "red" ? "white" : "red";
238 elemStyle.setProperty("background-color", "${toggleColor}"); 238 elemStyle.setProperty("background-color", "${toggleColor}");
239 }); 239 });
240 240
241 // Calling template inside of a template: 241 // Calling template inside of a template:
242 // document.body.elements.add(new Templates(friends).root); 242 // document.body.elements.add(new Templates(friends).root);
243 } 243 }
OLDNEW
« no previous file with comments | « utils/tests/template/real_app.dart ('k') | utils/tests/template/test_complex.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698