diff options
Diffstat (limited to 'js/polyfill.js')
-rw-r--r-- | js/polyfill.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/js/polyfill.js b/js/polyfill.js index 707a89a..069b1bc 100644 --- a/js/polyfill.js +++ b/js/polyfill.js @@ -63,3 +63,12 @@ if (!Int8Array.prototype.fill) { if (!Int32Array.prototype.fill) { Int32Array.prototype.fill = Array.prototype.fill; } + +if (!Int8Array.prototype.slice) { + Object.defineProperty(Int8Array.prototype, 'slice', { + value: function (begin, end) + { + return new Int8Array(Array.prototype.slice.call(this, begin, end)); + } + }); +} |