| OLD | NEW |
| 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 /** | 5 /** |
| 6 * A binding delegate used with Polymer elements that | 6 * A binding delegate used with Polymer elements that |
| 7 * allows for complex binding expressions, including | 7 * allows for complex binding expressions, including |
| 8 * property access, function invocation, | 8 * property access, function invocation, |
| 9 * list/map indexing, and two-way filtering. | 9 * list/map indexing, and two-way filtering. |
| 10 * | 10 * |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * [Polymer expressions](http://pub.dartlang.org/packages/polymer_expressions) | 23 * [Polymer expressions](http://pub.dartlang.org/packages/polymer_expressions) |
| 24 * pub repository contains detailed documentation about using polymer | 24 * pub repository contains detailed documentation about using polymer |
| 25 * expressions. | 25 * expressions. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 library polymer_expressions; | 28 library polymer_expressions; |
| 29 | 29 |
| 30 import 'dart:async'; | 30 import 'dart:async'; |
| 31 import 'dart:html'; | 31 import 'dart:html'; |
| 32 | 32 |
| 33 import 'package:logging/logging.dart'; |
| 33 import 'package:observe/observe.dart'; | 34 import 'package:observe/observe.dart'; |
| 34 import 'package:logging/logging.dart'; | 35 import 'package:template_binding/template_binding.dart'; |
| 35 | 36 |
| 36 import 'eval.dart'; | 37 import 'eval.dart'; |
| 37 import 'expression.dart'; | 38 import 'expression.dart'; |
| 38 import 'parser.dart'; | 39 import 'parser.dart'; |
| 39 import 'src/globals.dart'; | 40 import 'src/globals.dart'; |
| 40 | 41 |
| 41 final Logger _logger = new Logger('polymer_expressions'); | 42 final Logger _logger = new Logger('polymer_expressions'); |
| 42 | 43 |
| 43 // TODO(justin): Investigate XSS protection | 44 // TODO(justin): Investigate XSS protection |
| 44 Object _classAttributeConverter(v) => | 45 Object _classAttributeConverter(v) => |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 @reflectable get value => _value; | 131 @reflectable get value => _value; |
| 131 | 132 |
| 132 @reflectable set value(v) { | 133 @reflectable set value(v) { |
| 133 try { | 134 try { |
| 134 assign(_expr, v, _scope); | 135 assign(_expr, v, _scope); |
| 135 } on EvalException catch (e) { | 136 } on EvalException catch (e) { |
| 136 _logger.warning("Error evaluating expression '$_expr': ${e.message}"); | 137 _logger.warning("Error evaluating expression '$_expr': ${e.message}"); |
| 137 } | 138 } |
| 138 } | 139 } |
| 139 } | 140 } |
| OLD | NEW |