Skip to content
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

Data: Patch & warn about props from Object.prototype in data objects #561

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

mgol
Copy link
Member

@mgol mgol commented Jan 14, 2025

NOTE: Right now, this PR includes PR #555; only review the commit titled "Data: Patch & warn about props from Object.prototype in data objects". This PR should not be merged before #555; that's the only reason it's in a draft state.

Ref gh-559

@mgol mgol merged commit 868e11d into jquery:main Mar 3, 2025
9 checks passed
@mgol mgol deleted the data-proto branch March 3, 2025 17:16
mgol added a commit that referenced this pull request Mar 3, 2025
Changes:
1. Patch not only `jQuery.data()`, but also `jQuery.fn.data()`.
2. Patch `jQuery.removeData()` & `jQuery.fn.removeData()` to work in most cases
   when different keys with the same camelCase representation were passed to
   the data setter and later to `removeData`.
3. Warn about using properties inherited from `Object.prototype` on data
   objects.

Closes gh-559
Ref gh-561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants