iamnoah / writeCapture

Utility to assist the Ajax loading of HTML containing script tags that use document.write. Mailing List: http://groups.google.com/group/writecapturejs-users
http://iamnoah.github.com/writeCapture
Other
241 stars 38 forks source link

Fix nolib with IE6 and deep copies #32

Closed brewt closed 13 years ago

brewt commented 13 years ago

IE6 has issues with cloneNode() where it doesn't do a proper deep copy. We don't really need to use cloneNode() here, so just use removeChild() instead.

Examples, where cloneNode() doesn't work:

http://blog.pengoworks.com/index.cfm/2007/7/16/IE6--IE7-quirks-with-cloneNode-and-form-elements http://msdn.microsoft.com/en-us/library/ms536365%28v=vs.85%29.aspx (see comments)

I my case, it was an ad which had an OBJECT with PARAMs in them, where the PARAMs weren't getting copied. Was working fine when using it with jQuery, but not so with nolib.

Not 100% on the implications of the change, but I believe it should be okay.