| OLD | NEW |
| (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> | |
| OLD | NEW |