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

Side by Side Diff: lib/src/js/polymer_array_methods.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/common/polymer_serialize.dart ('k') | lib/src/js/polymer_base_dart.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <link rel="import" href="polymer_base_dart.html">
2 <script>
3 (function() {
4 var _originalPush = Polymer.Base.push;
5 Polymer.Base.push = function(path) {
6 var value = _originalPush.apply(this, arguments);
7 var dartList = this.get(path).__dartClass__;
8 if (dartList == null) return value;
9 Polymer.Dart.push(dartList, Array.prototype.splice.call(arguments, 1));
10 return value;
11 };
12
13 Polymer.Base._originalPop = Polymer.Base.pop;
14 Polymer.Base.pop = function(path) {
15 var value = this._originalPop(path);
16 var dartList = this.get(path).__dartClass__;
17 if (dartList == null) return value;
18 Polymer.Dart.pop(dartList);
19 return value;
20 };
21
22 Polymer.Base._originalShift = Polymer.Base.shift;
23 Polymer.Base.shift = function(path) {
24 var value = this._originalShift(path);
25 var dartList = this.get(path).__dartClass__;
26 if (dartList == null) return value;
27 Polymer.Dart.shift(dartList);
28 return value;
29 };
30
31 var _originalUnshift = Polymer.Base.unshift;
32 Polymer.Base.unshift = function(path) {
33 var value = _originalUnshift.apply(this, arguments);
34 var dartList = this.get(path).__dartClass__;
35 if (dartList == null) return value;
36 Polymer.Dart.unshift(dartList, Array.prototype.splice.call(arguments, 1));
37 return value;
38 };
39
40 var _originalSplice = Polymer.Base.splice;
41 Polymer.Base.splice = function(path, index, removeCount) {
42 var value = _originalSplice.apply(this, arguments);
43 var dartList = this.get(path).__dartClass__;
44 if (dartList == null) return value;
45 Polymer.Dart.splice(
46 dartList, index, removeCount,
47 Array.prototype.splice.call(arguments, 3));
48 return value;
49 };
50 })();
51 </script>
OLDNEW
« no previous file with comments | « lib/src/common/polymer_serialize.dart ('k') | lib/src/js/polymer_base_dart.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698