| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 <import src="sky-binder.sky" as="binder" /> | 6 <import src="sky-binder.sky" as="binder" /> |
| 7 <import src="element-registry.sky" as="registry" /> | 7 <import src="element-registry.sky" as="registry" /> |
| 8 <script> | 8 <script> |
| 9 function parseAttributeSpec(registration, definition) { | 9 function parseAttributeSpec(registration, definition) { |
| 10 var spec = definition.getAttribute('attributes'); | 10 var spec = definition.getAttribute('attributes'); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 this.attached(); | 126 this.attached(); |
| 127 this.isAttached = true; | 127 this.isAttached = true; |
| 128 } | 128 } |
| 129 | 129 |
| 130 detachedCallback() { | 130 detachedCallback() { |
| 131 this.detached(); | 131 this.detached(); |
| 132 this.isAttached = false; | 132 this.isAttached = false; |
| 133 } | 133 } |
| 134 | 134 |
| 135 attributeChangedCallback(name, oldValue, newValue) { | 135 attributeChangedCallback(name, oldValue, newValue) { |
| 136 if (registry.isExpandableAttribute(name)) |
| 137 return; |
| 136 this.attributeChanged(name, oldValue, newValue); | 138 this.attributeChanged(name, oldValue, newValue); |
| 137 var registration = registry.getRegistration(this.localName); | 139 var registration = registry.getRegistration(this.localName); |
| 138 var converter = registration.attributes.get(name); | 140 var converter = registration.attributes.get(name); |
| 139 if (converter) { | 141 if (converter) { |
| 140 this.notifyPropertyChanged(name, converter(oldValue), | 142 this.notifyPropertyChanged(name, converter(oldValue), |
| 141 converter(newValue)); | 143 converter(newValue)); |
| 142 } | 144 } |
| 143 } | 145 } |
| 144 | 146 |
| 145 notifyPropertyChanged(name, oldValue, newValue) { | 147 notifyPropertyChanged(name, oldValue, newValue) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 binding.setValue(this[name]); | 186 binding.setValue(this[name]); |
| 185 binding.discardChanges(); | 187 binding.discardChanges(); |
| 186 } | 188 } |
| 187 } | 189 } |
| 188 this.dirtyPropertyBindings = null; | 190 this.dirtyPropertyBindings = null; |
| 189 } | 191 } |
| 190 }; | 192 }; |
| 191 | 193 |
| 192 module.exports = SkyElement; | 194 module.exports = SkyElement; |
| 193 </script> | 195 </script> |
| OLD | NEW |