| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 2 Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 3 for details. All rights reserved. Use of this source code is governed by a | 3 for details. All rights reserved. Use of this source code is governed by a |
| 4 BSD-style license that can be found in the LICENSE file. | 4 BSD-style license that can be found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 <script> | 6 <script> |
| 7 if (Polymer.Bind) { | 7 if (Polymer.Bind) { |
| 8 // Overwrite prepareInstance to a no-op for dart elements. | |
| 9 Polymer.Bind._originalPrepareInstance = Polymer.Bind.prepareInstance; | |
| 10 Polymer.Bind.prepareInstance = function (inst) { | |
| 11 if (inst.__isPolymerDart__) return; | |
| 12 this._originalPrepareInstance(inst); | |
| 13 }; | |
| 14 | |
| 15 // We always need to create property accessors for dart elements, because we | 8 // We always need to create property accessors for dart elements, because we |
| 16 // always have `effects` (updating the dart class). | 9 // always have `effects` (updating the dart class). |
| 17 // TODO(jakemac): Investigate making the updating of the dart class be an | 10 // TODO(jakemac): Investigate making the updating of the dart class be an |
| 18 // actual `effect` so that we don't have to do this hack. | 11 // actual `effect` so that we don't have to do this hack. |
| 19 Polymer.Bind.oldCreateBindings = Polymer.Bind.createBindings; | 12 Polymer.Bind.oldCreateBindings = Polymer.Bind.createBindings; |
| 20 Polymer.Bind.createBindings = function(model) { | 13 Polymer.Bind.createBindings = function(model) { |
| 21 if (!model.__isPolymerDart__) { | 14 if (!model.__isPolymerDart__) { |
| 22 this.oldCreateBindings(model); | 15 this.oldCreateBindings(model); |
| 23 return; | 16 return; |
| 24 } | 17 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 45 // effects have priority | 38 // effects have priority |
| 46 if (fx) { | 39 if (fx) { |
| 47 fx.sort(this._sortPropertyEffects); | 40 fx.sort(this._sortPropertyEffects); |
| 48 } | 41 } |
| 49 // create accessors | 42 // create accessors |
| 50 this._createAccessors(model, n, fx); | 43 this._createAccessors(model, n, fx); |
| 51 } | 44 } |
| 52 }; | 45 }; |
| 53 } | 46 } |
| 54 </script> | 47 </script> |
| OLD | NEW |