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

Side by Side Diff: pkg/polymer_expressions/example/example.dart

Issue 24031006: Silently handle handle eval exceptions in PolymerExpressions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/polymer_expressions/lib/eval.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import 'package:logging/logging.dart';
8 import 'package:mdv/mdv.dart' as mdv;
7 import 'package:polymer_expressions/polymer_expressions.dart'; 9 import 'package:polymer_expressions/polymer_expressions.dart';
8 import 'package:mdv/mdv.dart' as mdv;
9 10
10 import 'person.dart'; 11 import 'person.dart';
11 12
12 main() { 13 main() {
13 mdv.initialize(); 14 mdv.initialize();
15 new Logger('polymer_expressions').onRecord.listen((LogRecord r) {
16 print("${r.loggerName} ${r.level} ${r.message}");
17 });
18
14 var john = new Person('John', 'Messerly', ['A', 'B', 'C']); 19 var john = new Person('John', 'Messerly', ['A', 'B', 'C']);
15 var justin = new Person('Justin', 'Fagnani', ['D', 'E', 'F']); 20 var justin = new Person('Justin', 'Fagnani', ['D', 'E', 'F']);
16 var globals = { 21 var globals = {
17 'uppercase': (String v) => v.toUpperCase(), 22 'uppercase': (String v) => v.toUpperCase(),
18 'people': [john, justin], 23 'people': [john, justin],
19 }; 24 };
20 25
21 query('#test') 26 query('#test')
22 ..bindingDelegate = new PolymerExpressions(globals: globals) 27 ..bindingDelegate = new PolymerExpressions(globals: globals)
23 ..model = john; 28 ..model = john;
24 29
25 query('#test2').model = john; 30 query('#test2').model = john;
26 } 31 }
OLDNEW
« no previous file with comments | « no previous file | pkg/polymer_expressions/lib/eval.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698