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

Side by Side Diff: lib/src/js/polymer_bind_dart.html

Issue 1351693003: Update to use one less proxy per element (Closed) Base URL: git@github.com:dart-lang/polymer-dart.git@behaviors
Patch Set: update comments Created 5 years, 2 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
« no previous file with comments | « lib/src/js/polymer_base_dart.html ('k') | test/src/common/behavior_composition_test.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 <!-- 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
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>
OLDNEW
« no previous file with comments | « lib/src/js/polymer_base_dart.html ('k') | test/src/common/behavior_composition_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698