diff options
author | timmywil <tim.willison@thisismedium.com> | 2011-04-13 23:45:58 -0400 |
---|---|---|
committer | timmywil <tim.willison@thisismedium.com> | 2011-04-13 23:45:58 -0400 |
commit | ca5bc202ac37a8e3d5787b24ea3fdc229143802c (patch) | |
tree | 2b380ff4ea689a65e9e98ea8aa00d41ff3bfaead /src/manipulation.js | |
parent | 149a040794b3b52bc392281fab68aba40c7018ce (diff) | |
download | jquery-ca5bc202ac37a8e3d5787b24ea3fdc229143802c.tar.gz jquery-ca5bc202ac37a8e3d5787b24ea3fdc229143802c.zip |
IE9's support for SVG elements unfortunately does not extend to clearAttributes. Checks for its presence before proceeding.
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 711cb5e88..f519b4d35 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -388,11 +388,15 @@ function cloneFixAttributes( src, dest ) { // clearAttributes removes the attributes, which we don't want, // but also removes the attachEvent events, which we *do* want - dest.clearAttributes(); + if ( dest.clearAttributes ) { + dest.clearAttributes(); + } // mergeAttributes, in contrast, only merges back on the // original attributes, not the events - dest.mergeAttributes(src); + if ( dest.mergeAttributes ) { + dest.mergeAttributes( src ); + } // IE6-8 fail to clone children inside object elements that use // the proprietary classid attribute value (rather than the type |