Fix #12132. IE10 dislikes detached object elements. Close gh-870.

This commit is contained in:
Elijah Manor 2012-07-24 14:34:14 -04:00 committed by Dave Methvin
parent 91dfb28dd8
commit 077987876b

View File

@ -436,11 +436,12 @@ function cloneFixAttributes( src, dest ) {
nodeName = dest.nodeName.toLowerCase();
// IE6-8 fail to clone children inside object elements that use
// the proprietary classid attribute value (rather than the type
// attribute) to identify the type of content to display
if ( nodeName === "object" ) {
dest.outerHTML = src.outerHTML;
// IE6-10 improperly clones children of object elements using classid.
// IE10 throws NoModificationAllowedError if parent is null, #12132.
if ( dest.parentNode ) {
dest.outerHTML = src.outerHTML;
}
// This path appears unavoidable for IE9. When cloning an object
// element in IE9, the outerHTML strategy above is not sufficient.