Skip to main content

Bug Tracker

Side navigation

#9514 closed bug (cantfix)

Opened June 03, 2011 10:23PM UTC

Closed June 04, 2011 06:02PM UTC

clone() of LINK from parent followed by append() into child document fails on IE6 and IE7

Reported by: social@kolich.com Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

A page (the parent) contains an <iframe> (the child). The child <iframe> uses jQuery to find relevant <script>'s and stylesheet <link>'s sourced in the <head> of the parent, and attempts to add those resources to the <head> of itself. In other words, <script>'s and <link>'s found in the parent are dynamically added to the child using jQuery.

This works in IE8+, FF3+, Chrome and Safari -- in these cases, I see that the <script>'s and CSS related <link>'s are correctly found, cloned and appended to the <head> of the child <iframe>. In IE6 and IE7, the same code fails to properly clone() and append() any associated <link>'s from the parent into the child. Note that <script>'s work fine, but IE6 and IE7 reports an "illegal argument" error inside of jQuery when cloning and appending a <link>.

I tried to reproduce this bug in JSFiddle, but couldn't fit things together correctly in that environment. As a result, my write-up of the problem, and code that reproduces the issue, can be found at:

http://temp.koli.ch/jquery-clone-bug

A quick search of existing bugs produced no interesting results.

Please let me know if you need more information.

Regards,

Mark

Attachments (0)
Change History (1)

Changed June 04, 2011 06:02PM UTC by dmethvin comment:1

resolution: → cantfix
status: newclosed

Unfortunately we can't work around this browser issue inside core. You can Google around and see this has been a problem in IE6/7 for a decade, e.g. http://www.webmasterkb.com/Uwe/Forum.aspx/jscript/2731/HOWTO-copy-nodes-from-one-IFRAME-to-another-IFRAME

You might try using an HTML rendering instead.