Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge) #4792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

mgol
Copy link
Member

@mgol mgol commented Sep 21, 2020

Summary

Drop support for EdgeHTML (i.e. non-Chromium Microsoft Edge).

Also, restrict some workarounds that were applied unconditionally in all
browsers to run only in IE now. This slightly increases the size but reduces
the performance burden on modern browsers that don't need the workarounds.

Also, clean up some comments & remove some obsolete workarounds.

Fixes gh-4568

-255 bytes 🎉

Checklist

@@ -543,7 +543,7 @@ jQuery.extend( {
if ( s.crossDomain == null ) {
urlAnchor = document.createElement( "a" );

// Support: IE <=8 - 11+, Edge 12 - 17 only
// Support: IE <=8 - 11+
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed mentions of Edge from support comments as well. Among other things, this is because many IE workarounds are now hidden behind an isIE check so a support comment mentioning Edge would be confusing as Edge wouldn't execute that code.

IE is quite special here as that's the only browser which we detect as a browser to work around its bugs instead of running support tests.

@mgol
Copy link
Member Author

mgol commented Sep 21, 2020

Travis fails because tests on Firefox ESR are run on version 68 at the moment. That version doesn't support the nonce property yet as that was only fixed in v75. Support for Firefox 68 ESR ends tomorrow so I can re-run Travis tomorrow or the day after that.

Comment on lines +7 to +8
return jQuery.contains( elem.ownerDocument, elem ) ||
elem.getRootNode( composed ) === elem.ownerDocument;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reorganizing the definitions decreased the gzipped size a bit.

Also, restrict some workarounds that were applied unconditionally in all
browsers to run only in IE now. This slightly increases the size but reduces
the performance burden on modern browsers that don't need the workarounds.

Also, clean up some comments & remove some obsolete workarounds.

Fixes jquerygh-4568
@mgol mgol changed the title Core: Drop support for EdgeHTML (i.e. non-Chromium Microsoft Edge) Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge) Sep 22, 2020
@mgol mgol merged commit e35fb62 into jquery:master Sep 22, 2020
@mgol mgol deleted the drop-edgehtml branch September 22, 2020 15:49
@mgol mgol added this to the 4.0.0 milestone Sep 22, 2020
mgol added a commit to mgol/jquery that referenced this pull request Jun 29, 2023
Both IE & Edge Legacy need the workaround of calling `setDocument()` in an
`unload` handler to avoid "permission denied" errors. However, due to not being
possible to feature-detect this issue, the handler has been applied in all
browsers for windows different than the one in which jQuery was loaded.

jQuery 4.0, which drops Edge Legacy support, guards this workaround with
a `document.documentMode` check. This won't work in the 3.x line due to still
supporting Edge Legacy but we can check for
`document.documentElement.msMatchesSelector` instead as that API is supported
in IE 9+ and all Edge Legacy versions.

Fixes jquerygh-5281
Ref jquerygh-4792
mgol added a commit that referenced this pull request Jul 10, 2023
Both IE & Edge Legacy need the workaround of calling `setDocument()` in an
`unload` handler to avoid "permission denied" errors. However, due to not being
possible to feature-detect this issue, the handler has been applied in all
browsers for windows different than the one in which jQuery was loaded.

jQuery 4.0, which drops Edge Legacy support, guards this workaround with
a `document.documentMode` check. This won't work in the 3.x line due to still
supporting Edge Legacy but we can check for
`document.documentElement.msMatchesSelector` instead as that API is
supported in IE 9+ and all Edge Legacy versions.

Fixes gh-5281
Closes gh-5282
Ref gh-4792
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Drop support for Edge Legacy (EdgeHTML-based) in 4.0?
2 participants