Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJS#4347

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mgol merged 1 commit intojquery:masterfrommgol:support-updates
Apr 29, 2019

Conversation

mgol
Copy link
Member

@mgolmgol commentedApr 10, 2019
edited
Loading

Summary

Also, update support comments format to match format described in:
jquery/contribute.jquery.org#95 (comment)
with the change from:
jquery/contribute.jquery.org#95 (comment)
(open-ended ranges end with+).

Further size reductions will be achieved when we drop Firefox 60, iOS 10
and pre-Chromium Edge versions.

Fixesgh-3950
Fixesgh-4299

Checklist

jadjoubran reacted with hooray emojijadjoubran reacted with rocket emoji
@mgolmgol added this to the4.0.0 milestoneApr 10, 2019
@mgolmgolforce-pushed thesupport-updates branch 2 times, most recently fromba2c346 to108d0a0CompareApril 10, 2019 13:22
@mgol
Copy link
MemberAuthor

mgol commentedApr 10, 2019
edited
Loading

-540-577-867 -856 bytes.

I recommend reviewing with whitespace changes ignored (e.g. viaadding?w=1 to the URL) to see real changes inxhr.js that got de-indented.

A few open questions:

  1. I removedsupport.cors &support.ajax - are we OK with always assuming they're true? I'm not sure if IE 11 allows to disable native XHR as earlier IE did or if we still want to cater to those scenarios (we don't support the ActiveX versions anyway).
  2. In a few places (e.g.src/data/Data.js) we don't delete stuff from DOM nodes, instead setting them toundefined. It's supposedly to help with DOM performance in Blink/WebKit; the ticket referenced there is not available to the public, though. Do we know if this is still true and if it maybe applies to Gecko as well or not? I'd tweak the comment then.
  3. wrapMap.js references IE 9 directly in two places. Most of the file is covered by the comment the wrapping is needed when used in XHTML; is that not true foroption as well? We should either moveoption handling to be under the same XHTML-related comment, remove it or update the support comment if it's still needed for IE 11. Update: this code has been removed from the PR.
  4. curCSS.js references thatelem.style is retrieved before the computed style as it fixes some issue in Firefox where it gets wrong values on detached elements. I couldn't find any relevant test or any more details about the supposed issue, could you help,@timmywil, as you committed the change? This has been removed as the workaround that needed it is gone (it was neeeded for iOS 10 only).

Copy link
Member

@dmethvindmethvin left a comment

Choose a reason for hiding this comment

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

👏 👏

},
xhrSupported = jQuery.ajaxSettings.xhr();

support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
Copy link
Member

Choose a reason for hiding this comment

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

The scenarios where I've ever seen this used arejQuery.support.cors = true, that is, just setting the value. I wonder if there are a lot of cases where people check to see if it'strue in their own code? If so it might be safest to set it totrue here. Here's an example of some code that would break if we didn't:victorquinn/Backbone.CrossDomain#1

Copy link
MemberAuthor

@mgolmgolApr 10, 2019
edited
Loading

Choose a reason for hiding this comment

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

I guess we could add a line with:

jQuery.support.ajax = jQuery.support.cors = true;

todeprecated.js and add a warning to Migrate for code accessing it?

Copy link
Member

Choose a reason for hiding this comment

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

It's mainly useful of you want to gracefully degrade and/or fail in browsers without cors which will be none with the new support list. I think it would be better to keep it set to true for a good while indeprecated.js before removing it.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

We could also have Migrate fill in those properties as it's easy to do from outside. Technically speaking, external access tojQuery.support has never been supported.

@mgol
Copy link
MemberAuthor

mgol commentedApr 10, 2019
edited
Loading

BTW, dropping support for iOS 10 & Firefox 60 (which we'll most likely do before the 4.0 release as we'll drop them around September/October) will cause a further reduction by -272 bytes, getting us to -812 bytes compared tomaster and only+14 bytes compared to latest2.2.x. Here are relevant changes on top of this PR:mgol@724f955.

@mgol
Copy link
MemberAuthor

I ran tests locally on this PR on most of the supported browsers:
Screen Shot 2019-04-10 at 16 48 18

@mgolmgolforce-pushed thesupport-updates branch 2 times, most recently from3f6f9ea to40567caCompareApril 15, 2019 16:52
@mgol
Copy link
MemberAuthor

Per the discussion at the today's meeting, I changed the format of IE support comments from:

// Support: IE <=9 - 11 only

to:

// Support: IE <=9 - 11+

@mgol
Copy link
MemberAuthor

I added one more commit removing IE 9-related code fromwrapMap.js - I run some manual tests in XHTML mode and it didn't seem to cause any changes. The original wrapping of<option> in<select> was added in14b0902 (12.5 years ago!), it was changed to be wrapped in<select multiple> in264ffbc. Removing that wrapping does make more tests fail in IE 9 but IE 11 still passes all the tests.

This removal saved additional33 bytes. 🍾

@mgolmgol self-assigned thisApr 15, 2019
@mgol
Copy link
MemberAuthor

@jquery/core I've been thinking that maybe we should just drop Firefox 60 & iOS 10 in this PR as well. We'll do that anyway in October and it's not very likely we'll release 4.0 before that date. Especially dropping iOS 10 would give us a lot - it has a partially broken module support, early versions had partially broken Shadow DOM support, etc. Dropping it would help not only with library size but also it'd be easier to do all the upcoming major changes like the event system refactor, getting rid of Sizzle etc. if we didn't have to care about iOS 10 and breaking any of current workarounds targeted at it.

If, by any chance, we manage to land all those major changes, release an alpha/beta & then stable before we'd normally drop Firefox 60/iOS 10 (not very likely, IMO), we can always update the browser support page for jQuery 4.0 to state explicitly we don't support those browsers. We could later remove that note once they'd be out of our supported browser range anyway.

I already have relevant changes ready atmgol@724f955, I could just merge it to this PR.

What do you think?

jbedard reacted with thumbs up emoji

@dmethvin
Copy link
Member

I agree on the timeline, it seems likely that 4.0.0 could wait for those older browsers to drop below the threshold where we'd need to support them. It definitely cleans up some things!

@mgolmgolforce-pushed thesupport-updates branch 2 times, most recently from074a326 toee2fc25CompareApril 23, 2019 21:20
@mgol
Copy link
MemberAuthor

mgol commentedApr 24, 2019
edited
Loading

I added a commit dropping Firefox 60 & iOS 10. We can drop it if others disagree with me,@dmethvin &@jbedard but I think it makes sense to do it now.

We're down to-867 bytes!

Copy link
Member

@dmethvindmethvin left a comment

Choose a reason for hiding this comment

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

New changes LGTM

documentElement.mozMatchesSelector ||
documentElement.oMatchesSelector ||
documentElement.msMatchesSelector,
matches = documentElement.matches || documentElement.msMatchesSelector,
Copy link
Member

Choose a reason for hiding this comment

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

This could use a// Support comment since thems version should go away when we get a Chromium Edge.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Good point about a support comment but it won’t go away as IE needs it.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Comment added. I only mentioned IE as Edge doesn't need it since 4 versions already.

…& PhantomJSAlso, update support comments format to match format described in:jquery/contribute.jquery.org#95 (comment)with the change from:jquery/contribute.jquery.org#95 (comment)(open-ended ranges end with `+`).Fixesjquerygh-3950Fixesjquerygh-4299
@mgolmgol changed the titleCore: Drop support for IE <11, iOS <10, Android Browser & PhantomJSCore: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJSApr 29, 2019
@mgolmgol merged commitcf84696 intojquery:masterApr 29, 2019
@mgolmgol deleted the support-updates branchApril 29, 2019 20:56
@@ -172,9 +150,6 @@ function domManip( collection, args, callback, ignored ) {

// Keep references to cloned scripts for later restoration
if ( hasScripts ) {

// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( scripts, getAll( node, "script" ) );
Copy link
Member

Choose a reason for hiding this comment

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

@mgol I was just going back over this PR and wondering about the loss of context here and before otherjQuery.merge calls...should we switch this topush.apply( scripts, getAll( node, "script" ) ) or have a comment explaining why it avoids that pattern?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Right... We no longer care about Android 4.0 or PhantomJS 1 but I remember using thepush.apply approach may lead to issues like#4320. Perhaps a comment to that effect would be useful.

gibson042 reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I created#5298 to track this & other related uses ofpush.apply vs.jQuery.merge to consider.

@@ -475,9 +456,6 @@ jQuery.each( {
for ( ; i <= last; i++ ) {
elems = i === last ? this : this.clone( true );
jQuery( insert[ i ] )[ original ]( elems );

// Support: Android <=4.0 only, PhantomJS 1 only
// .get() because push.apply(_, arraylike) throws on ancient WebKit
push.apply( ret, elems.get() );
Copy link
Member

Choose a reason for hiding this comment

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

Here too; why isn't thispush.apply( ret, elems )?

mgol added a commit to mgol/jquery that referenced this pull requestApr 30, 2019
A leftover `rboxStyle` was left in the wrapper parameters but not in thedependency array, causing `getStyles` to be undefined in AMD mode.Since `rboxStyle` is no longer used, it's now removed.Refjquerygh-4347
@mgolmgol mentioned this pull requestApr 30, 2019
2 tasks
mgol added a commit that referenced this pull requestApr 30, 2019
A leftover `rboxStyle` was left in the wrapper parameters but not in thedependency array, causing `getStyles` to be undefined in AMD mode.Since `rboxStyle` is no longer used, it's now removed.Refgh-4347Closesgh-4380
mgol added a commit to mgol/jquery that referenced this pull requestAug 21, 2019
Previously, jQuery.ajaxSettings.xhr, contents were wrapped in a try-catchas we defined jQuery.support.ajax & jQuery.support.cors executed during thejQuery load and we didn't want to crash if IE had native XHR disabled (whichis possible). While jQuery hasn't supported the ActiveX-based XHR since 2.0,jQuery with XHR disabled could still be used for its other features in sucha crippled browser.Sincejquerygh-4347, jQuery.support.ajax & jQuery.support.cors no longer exist, sowe don't need the try-catch anymore.Fixesjquerygh-1967Refjquerygh-4347
mgol added a commit to mgol/jquery that referenced this pull requestAug 22, 2019
Previously, jQuery.ajaxSettings.xhr, contents were wrapped in a try-catchas we defined jQuery.support.ajax & jQuery.support.cors executed during thejQuery load and we didn't want to crash if IE had native XHR disabled (whichis possible). While jQuery hasn't supported the ActiveX-based XHR since 2.0,jQuery with XHR disabled could still be used for its other features in sucha crippled browser.Sincejquerygh-4347, jQuery.support.ajax & jQuery.support.cors no longer exist, sowe don't need the try-catch anymore.Fixesjquerygh-1967Refjquerygh-4347
mgol added a commit that referenced this pull requestAug 26, 2019
Previously, jQuery.ajaxSettings.xhr, contents were wrapped in a try-catchas we defined jQuery.support.ajax & jQuery.support.cors executed during thejQuery load and we didn't want to crash if IE had native XHR disabled (whichis possible). While jQuery hasn't supported the ActiveX-based XHR since 2.0,jQuery with XHR disabled could still be used for its other features in sucha crippled browser.Sincegh-4347, jQuery.support.ajax & jQuery.support.cors no longer exist, sowe don't need the try-catch anymore.Fixesgh-1967Closesgh-4467Refgh-4347
@locklockbot locked asresolvedand limited conversation to collaboratorsOct 27, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@jaubourgjaubourgjaubourg left review comments

@gibson042gibson042gibson042 left review comments

@dmethvindmethvindmethvin approved these changes

Assignees

@mgolmgol

Milestone
4.0.0
Development

Successfully merging this pull request may close these issues.

jQuery: Drop IE<11 support in jQuery 4.0 Support only last 3 iOS versions and drop Android Browser in jQuery 4.0+
4 participants
@mgol@dmethvin@jaubourg@gibson042

[8]ページ先頭

©2009-2025 Movatter.jp