🔗Prototype polyfills
The prototype infrastructure makes functions available in modern browsers available to older browsers lacking the native support.
prototype/element.prototoype.matches.jspolyfills Element.matchesprototype/svgelement.prototype.focus.jsmakesHTMLElement.focusavailable atSVGElement.focus(which is not formally specified prior to SVG 2)prototype/window.customevent.jspolyfills theCustomEventconstructor (but returns it rather than overwritingwindow.CustomEventin Internet Explorer)prototype/window.requestanimationframe.jspolyfills therequestAnimationFramefunction for older Internet Explorer
Additionally ally.js uses the following third party polyfills:
CSS.escapeto polyfill the CSSOMCSS.escapefunction- array.prototype.findindex to polyfill the ES6
Array.findIndex - domtokenlist-shim to polyfill the Element.classList interface
🔗Contributing
ally.js is not using the babel polyfill because it is too big for the rather limited subset we're using at the moment. This may change in the future, but we're not keen on making this move.
ally.js will not pollute prototypes of built-in methods with anything but proper polyfills for (semi-) standardized methods. If we need to add another polyfill, we'll prefer to use an external dependency over implementing things ourselves.