Ticket #3031 (closed bug: duplicate)
Clone with IE6 inside of an iframe
|Reported by:||bgrinstead||Owned by:|
|Keywords:||iframe clone IE||Cc:|
I noticed that the clone method would throw an error when I tried to clone an element with a different ownerDocument (such as an iframe) in IE6. After running the code through a debugger, I see that inside the clone method, it needs to pass the new container's owner document through to the clean event.
return jQuery.clean([container.innerHTML], container.ownerDocument);
This seems to fix the problem. You can replicate it by having an iframe with a dom element inside of it, then calling jQuery("#myElement").clone(). Works fine in firefox, but in IE, you get an invalid argument error. My suggested change fixes this problem.
Sorry if this is the wrong place to put this, but I am new to open source software and didn't feel comfortable (or know how) to make an official patch or whatever. There doesn't seem to be any good tutorials on how to do this on the jQuery site, but if I am missing such a thing, please feel free to let me know :)