mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
JS: remove old polyfill
This commit is contained in:
parent
02b3c92912
commit
bb0d4a4fc6
|
@ -56,22 +56,6 @@ function $rt_castToClass(obj, cls) {
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
Array.prototype.fill = Array.prototype.fill || function(value,start,end) {
|
|
||||||
var len = this.length;
|
|
||||||
if (!len) return this;
|
|
||||||
start = start | 0;
|
|
||||||
var i = start < 0
|
|
||||||
? Math.max(len + start, 0)
|
|
||||||
: Math.min(start, len);
|
|
||||||
end = end === undefined ? len : end | 0;
|
|
||||||
end = end < 0
|
|
||||||
? Math.max(len + end, 0)
|
|
||||||
: Math.min(end, len);
|
|
||||||
for (; i < end; i++) {
|
|
||||||
this[i] = value;
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
function $rt_createArray(cls, sz) {
|
function $rt_createArray(cls, sz) {
|
||||||
var data = new Array(sz);
|
var data = new Array(sz);
|
||||||
data.fill(null);
|
data.fill(null);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user