Skip to content

Commit f1ae17b

Browse files
authored
Merge pull request #1241 from Patternslib/more-cleanup
More cleanup
2 parents a33c4e8 + 93841ba commit f1ae17b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/core/polyfills.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
// SubmitEvent.submitter polyfill for Safari < 15.4 and jsDOM
44
// Original code: https://stackoverflow.com/a/61110260/1337474
55
// Also see: https://caniuse.com/?search=submitter
6-
//
6+
// NOTE: the `submitter` property is now widely available except for ancient browsers and jsDOM.
77
!(function () {
8+
if (window.SubmitEvent && "submitter" in window.SubmitEvent.prototype) {
9+
// `submitter` attribute is already supported.
10+
return;
11+
}
12+
813
let last_btn = null;
914
const submitable_buttons = `button, input[type="button"], input[type="submit"], input[type="image"]`;
1015
document.addEventListener(

webpack/webpack.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ module.exports = () => {
4646
config.plugins.push(
4747
new CopyPlugin({
4848
patterns: [
49-
// Copy polyfills loader to the output path.
50-
// TODO: Polyfills not used anymore, remove for next major version.
51-
{ from: path.resolve(__dirname, "../src/polyfills-loader.js") },
52-
5349
// Build and copy Modernizr.
5450
// We're abusing the CopyPlugin transform method here to build
5551
// a Modernizr bundle using the modernizr config. The input

0 commit comments

Comments
 (0)