MediaSearch as a feature is committed to functioning in IE11. However, we rely on a couple of features in JS that are not supported by that browser and need to be polyfilled or at least tested for.
Must be polyfilled
- Array.prototype.find
- Array.prototype.findIndex
May not be present but can be worked around
- Intersection Observer
- HTMLImageElement.decode (in init.js file for "hydration")
Current Status
- The array method polyfills are manually vendored in MediaSearch, but this means that they get shipped to all users, including the vast majority who don't need them. Fortunately they are each pretty small.
- The Observer component and the init.js file both contain tests for necessary browser features, so we don't need to add new polyfills here.
To Do
- See if we can add polyfills for the array methods here into MediaWiki core (similar to how Promise is handled), so that we don't need to ship this code to users who do not need it. Additionally, other MW developers will gain the ability to rely on these useful Array methods in their own code.