Drop support for Edge Legacy (is EOL), Firefox < 69, Chrome < 69, Safari < 12

This commit is contained in:
djmaze 2021-07-26 11:48:53 +02:00
parent d41b929c13
commit 4d655953de
3 changed files with 27 additions and 34 deletions

View file

@ -2,22 +2,7 @@
(w=>{
Array.prototype.flat || Object.defineProperty(Array.prototype, 'flat', {
configurable: true,
value: function flat(depth) {
depth = isNaN(depth) ? 1 : Number(depth);
return depth ? Array.prototype.reduce.call(this, (acc, cur) => {
if (Array.isArray(cur)) {
acc.push.apply(acc, flat.call(cur, depth - 1));
} else {
acc.push(cur);
}
return acc;
}, []) : this.slice();
},
writable: true
});
// Edge Legacy (pre chromium/webkit), Firefox < 69, Safari < 13.4
w.ResizeObserver || (w.ResizeObserver = class {
constructor(callback) {
this.observer = new MutationObserver(callback.debounce(250));