diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2020-03-02 23:02:42 +0100 |
---|---|---|
committer | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2020-03-02 23:05:58 +0100 |
commit | 413ff796ae16611777581e7657cb5ca76c3cfb1d (patch) | |
tree | bb0c33a5732a10bc2d62b69f32a150306d025af0 /src/data/Data.js | |
parent | 524bcf39da9d9aba67d9ec92433462cd936fcc89 (diff) | |
download | jquery-413ff796ae16611777581e7657cb5ca76c3cfb1d.tar.gz jquery-413ff796ae16611777581e7657cb5ca76c3cfb1d.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
(cherry picked from commit 9d76c0b163675505d1a901e5fe5249a2c55609bc)
Diffstat (limited to 'src/data/Data.js')
-rw-r--r-- | src/data/Data.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data/Data.js b/src/data/Data.js index 31ff4318c..ce6d8fa9b 100644 --- a/src/data/Data.js +++ b/src/data/Data.js @@ -22,7 +22,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. |