IE9's support for SVG elements unfortunately does not extend to clearAttributes. Checks for its presence before proceeding.

This commit is contained in:
timmywil 2011-04-13 23:45:58 -04:00
parent 149a040794
commit ca5bc202ac
2 changed files with 7 additions and 3 deletions

View file

@ -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