You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
mgol
changed the title
Warn about accessing props from Object.prototype in .data()
Warn about accessing props from Object.prototype in .data()/jQuery.event.specialOct 9, 2024
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: