| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 class _ChildrenElementList extends ListBase<Element> { | 7 class _ChildrenElementList extends ListBase<Element> { |
| 8 // Raw Element. | 8 // Raw Element. |
| 9 final Element _element; | 9 final Element _element; |
| 10 final HtmlCollection _childElements; | 10 final HtmlCollection _childElements; |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 changed = (value) { | 692 changed = (value) { |
| 693 if (_Bindings._toBoolean(value)) { | 693 if (_Bindings._toBoolean(value)) { |
| 694 self.xtag.attributes[name] = ''; | 694 self.xtag.attributes[name] = ''; |
| 695 } else { | 695 } else { |
| 696 self.xtag.attributes.remove(name); | 696 self.xtag.attributes.remove(name); |
| 697 } | 697 } |
| 698 }; | 698 }; |
| 699 } else { | 699 } else { |
| 700 changed = (value) { | 700 changed = (value) { |
| 701 // TODO(jmesserly): escape value if needed to protect against XSS. | 701 // TODO(jmesserly): escape value if needed to protect against XSS. |
| 702 // See https://github.com/toolkitchen/mdv/issues/58 | 702 // See https://github.com/polymer-project/mdv/issues/58 |
| 703 self.xtag.attributes[name] = value == null ? '' : '$value'; | 703 self.xtag.attributes[name] = value == null ? '' : '$value'; |
| 704 }; | 704 }; |
| 705 } | 705 } |
| 706 | 706 |
| 707 self.unbind(name); | 707 self.unbind(name); |
| 708 | 708 |
| 709 self._attributeBindings[name] = | 709 self._attributeBindings[name] = |
| 710 new PathObserver(model, path).bindSync(changed); | 710 new PathObserver(model, path).bindSync(changed); |
| 711 } | 711 } |
| 712 | 712 |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 const ScrollAlignment._internal(this._value); | 1032 const ScrollAlignment._internal(this._value); |
| 1033 toString() => 'ScrollAlignment.$_value'; | 1033 toString() => 'ScrollAlignment.$_value'; |
| 1034 | 1034 |
| 1035 /// Attempt to align the element to the top of the scrollable area. | 1035 /// Attempt to align the element to the top of the scrollable area. |
| 1036 static const TOP = const ScrollAlignment._internal('TOP'); | 1036 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1037 /// Attempt to center the element in the scrollable area. | 1037 /// Attempt to center the element in the scrollable area. |
| 1038 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1038 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1039 /// Attempt to align the element to the bottom of the scrollable area. | 1039 /// Attempt to align the element to the bottom of the scrollable area. |
| 1040 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1040 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1041 } | 1041 } |
| OLD | NEW |