diff options
author | Jason Bedard <jason+github@jbedard.ca> | 2015-07-18 11:27:11 -0700 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2015-09-08 20:22:54 +0200 |
commit | 0e982433eb94391b3e9f6838d9b8fbf9bb31abf9 (patch) | |
tree | 8a31c3546949a82aa3f6fea775b2a3dda06b1605 /src/manipulation.js | |
parent | d4def22e4cd1c2eb2571f449e226b38384fb6d81 (diff) | |
download | jquery-0e982433eb94391b3e9f6838d9b8fbf9bb31abf9.tar.gz jquery-0e982433eb94391b3e9f6838d9b8fbf9bb31abf9.zip |
Data: avoid using delete on DOM nodes
Closes gh-2479
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index b85ef1824..ceb970cbd 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -290,10 +290,16 @@ jQuery.extend( { } } } - delete elem[ dataPriv.expando ]; + + // Support: Chrome <= 35-45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; } if ( elem[ dataUser.expando ] ) { - delete elem[ dataUser.expando ]; + + // Support: Chrome <= 35-45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; } } } |