-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
Attributes: remove the lower-casing logic for attribute names #2916
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery used to lower-case the attribute names passed to the .attr setter to workaround an old IE issue. This is no longer in jQuery 3.0 and removing it may even "accidentally" make this API sort-of work on SVGs (see jquerygh-2910) so why not. Manual lowercasing had to be added to the place where the proper attrHook is retrieved so that it works regardless of the casing of the provided name. A regular `toLowerCase()` is enough there as those few attributes don't contain any non-ASCII characters. Fixes jquerygh-2914
I didn't add unit tests for that as we officially don't support SVG attribute manipulation but I've just noticed we have been testing that it works in some cases... So I'm not sure how to follow up on that one. |
Somehow I missed (twice!) that we back-ported this to 1.12.0/2.2,0, sorry! It makes sense to remove it for 3.0.0 since we were only lowercasing for old IE. |
mgol
added a commit
to mgol/jquery
that referenced
this pull request
May 29, 2016
Attribute hooks are determined for the lowercase versions of attribute names but this has not been reflected in the bool attribute hooks. The code that temporarily removed a handler to avoid an infinite loop was removing an incorrect handler causing stack overflow. Fixes jquerygh-3133 Refs jquerygh-2914 Refs jquerygh-2916
4 tasks
mgol
added a commit
to mgol/jquery
that referenced
this pull request
May 29, 2016
Attribute hooks are determined for the lowercase versions of attribute names but this has not been reflected in the bool attribute hooks. The code that temporarily removed a handler to avoid an infinite loop was removing an incorrect handler causing stack overflow. Fixes jquerygh-3133 Refs jquerygh-2914 Refs jquerygh-2916
mgol
added a commit
to mgol/jquery
that referenced
this pull request
May 29, 2016
Attribute hooks are determined for the lowercase versions of attribute names but this has not been reflected in the bool attribute hooks. The code that temporarily removed a handler to avoid an infinite loop was removing an incorrect handler causing stack overflow. Fixes jquerygh-3133 Refs jquerygh-2914 Refs jquerygh-2916
mgol
added a commit
to mgol/jquery
that referenced
this pull request
May 31, 2016
Attribute hooks are determined for the lowercase versions of attribute names but this has not been reflected in the bool attribute hooks. The code that temporarily removed a handler to avoid an infinite loop was removing an incorrect handler causing stack overflow. Fixes jquerygh-3133 Refs jquerygh-2914 Refs jquerygh-2916
mgol
added a commit
to mgol/jquery
that referenced
this pull request
Jun 3, 2016
Attribute hooks are determined for the lowercase versions of attribute names but this has not been reflected in the bool attribute hooks. The code that temporarily removed a handler to avoid an infinite loop was removing an incorrect handler causing stack overflow. Fixes jquerygh-3133 Refs jquerygh-2914 Refs jquerygh-2916
mgol
added a commit
to mgol/jquery
that referenced
this pull request
Jun 3, 2016
Attribute hooks are determined for the lowercase versions of attribute names but this has not been reflected in the bool attribute hooks. The code that temporarily removed a handler to avoid an infinite loop was removing an incorrect handler causing stack overflow. Fixes jquerygh-3133 Refs jquerygh-2914 Refs jquerygh-2916 Closes jquerygh-3134
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
jQuery used to lower-case the attribute names passed to the .attr setter
to workaround an old IE issue. This is no longer in jQuery 3.0 and
removing it may even "accidentally" make this API sort-of work on SVGs
(see gh-2910) so why not.
Manual lowercasing had to be added to the place where the proper
attrHook is retrieved so that it works regardless of the casing of the
provided name. A regular
toLowerCase()
is enough there as those fewattributes don't contain any non-ASCII characters.
Fixes gh-2914
-18 bytes