From 0fbb83469177541965fbc5222e4d4fa18ffefc25 Mon Sep 17 00:00:00 2001 From: Tomina Date: Fri, 27 Oct 2023 19:49:02 +0200 Subject: [PATCH] perf: remove add/remove event polyfills\n\nWe don't polyfill these browsers using core-js (i.e. it most likely doesn't work anyway) and barely anyone is using them nowadays. (#1702) --- lib/timeline/Core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index 085c9d4d3b..62549bfe71 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -1265,7 +1265,7 @@ class Core { }; // add event listener to window resize - util.addEventListener(window, 'resize', this._onResize); + window.addEventListener('resize', this._onResize); //Prevent initial unnecessary redraw if (me.dom.root) { @@ -1288,7 +1288,7 @@ class Core { // remove event listener on window.resize if (this._onResize) { - util.removeEventListener(window, 'resize', this._onResize); + window.removeEventListener('resize', this._onResize); this._onResize = null; } }