diff --git a/src/core/polyfills.js b/src/core/polyfills.js index f1de8a1fa..2ef0afce6 100644 --- a/src/core/polyfills.js +++ b/src/core/polyfills.js @@ -3,8 +3,13 @@ // SubmitEvent.submitter polyfill for Safari < 15.4 and jsDOM // Original code: https://stackoverflow.com/a/61110260/1337474 // Also see: https://caniuse.com/?search=submitter -// +// NOTE: the `submitter` property is now widely available except for ancient browsers and jsDOM. !(function () { + if (window.SubmitEvent && "submitter" in window.SubmitEvent.prototype) { + // `submitter` attribute is already supported. + return; + } + let last_btn = null; const submitable_buttons = `button, input[type="button"], input[type="submit"], input[type="image"]`; document.addEventListener( diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js index cd6ce4479..38a0f46f9 100644 --- a/webpack/webpack.config.js +++ b/webpack/webpack.config.js @@ -46,10 +46,6 @@ module.exports = () => { config.plugins.push( new CopyPlugin({ patterns: [ - // Copy polyfills loader to the output path. - // TODO: Polyfills not used anymore, remove for next major version. - { from: path.resolve(__dirname, "../src/polyfills-loader.js") }, - // Build and copy Modernizr. // We're abusing the CopyPlugin transform method here to build // a Modernizr bundle using the modernizr config. The input