-
Notifications
You must be signed in to change notification settings - Fork 476
Warn about accessing props from Object.prototype
in .data()
/jQuery.event.special
#542
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
Milestone
Comments
Object.prototype
in .data()
Object.prototype
in .data()
/jQuery.event.special
Oh, actually, the |
mgol
added a commit
to mgol/jquery-migrate
that referenced
this issue
Apr 8, 2025
Allow to use common `Object.prototype` properties on `jQuery.event.special` but warn as well. Fixes jquerygh-542
mgol
added a commit
to mgol/jquery-migrate
that referenced
this issue
Apr 14, 2025
Allow to use common `Object.prototype` properties on `jQuery.event.special` but warn as well. Fixes jquerygh-542
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since 4.0,
.data()
no longer inherits from Object.prototype; the same applies to theevents
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 fromObject.prototype
is read.Let's also handle
jQuery.event.special
which underwent the same changes.Ref jquery/jquery#4603
Ref jquery/jquery#5235
The text was updated successfully, but these errors were encountered: