aboutsummaryrefslogtreecommitdiffstats
path: root/src/data/Data.js
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-03-02 23:02:42 +0100
committerGitHub <noreply@github.com>2020-03-02 23:02:42 +0100
commit9d76c0b163675505d1a901e5fe5249a2c55609bc (patch)
tree33c4b3ec7a4d312b7db7f9ff1ef5ed21f15992c0 /src/data/Data.js
parent358b769a00c3a09a8ec621b8dcb2d5e31b7da69a (diff)
downloadjquery-9d76c0b163675505d1a901e5fe5249a2c55609bc.tar.gz
jquery-9d76c0b163675505d1a901e5fe5249a2c55609bc.zip
Data:Event:Manipulation: Prevent collisions with Object.prototype
Make sure events & data keys matching Object.prototype properties work. A separate fix for such events on cloned elements was added as well. Fixes gh-3256 Closes gh-4603
Diffstat (limited to 'src/data/Data.js')
-rw-r--r--src/data/Data.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data/Data.js b/src/data/Data.js
index 556f4e39c..a5eb09089 100644
--- a/src/data/Data.js
+++ b/src/data/Data.js
@@ -18,7 +18,7 @@ Data.prototype = {
// If not, create one
if ( !value ) {
- value = {};
+ value = Object.create( null );
// We can accept data for non-element nodes in modern browsers,
// but we should not, see #8335.