In the polyfill.js file, there exists a window.attachedEvents and two wrapper methods addEvent and removeEvent.
These methods were created to work around limitations of the once popular Internet Explorer browser to accommodate it’s attachEvent and removeEvent methods. Since IE9 (the oldest version that can still access Wikimedia websites) supports addEventListener and removeEventListener, these global methods are no longer necessary.
The work here involves deleting the following methods from the polyfills file:
And replacing all occurrences of addEvent and removeEvent from the codebase with native addEventListener and removeEventListener methods.