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

Warn about accessing props from Object.prototype in .data()/jQuery.event.special #542

Open
mgol opened this issue Oct 9, 2024 · 0 comments
Assignees
Milestone

Comments

@mgol
Copy link
Member

mgol commented Oct 9, 2024

Since 4.0, .data() no longer inherits from Object.prototype; the same applies to the events object from the private data store.

We should not restore the old behavior as that will reintroduce potential collisions with Object.prototype. We should, though, warn if a key matching a key from Object.prototype is read.

Let's also handle jQuery.event.special which underwent the same changes.

Ref jquery/jquery#4603
Ref jquery/jquery#5235

@mgol mgol added this to the 3.6.0 milestone Oct 9, 2024
@mgol mgol self-assigned this Oct 9, 2024
@mgol mgol changed the title Warn about accessing props from Object.prototype in .data() Warn about accessing props from Object.prototype in .data()/jQuery.event.special Oct 9, 2024
@jquery jquery deleted a comment from E-pic-C Oct 14, 2024
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

No branches or pull requests

1 participant