Bug Tracker

Modify

Ticket #4348 (closed bug: invalid)

Opened 5 years ago

Last modified 4 years ago

"htmlfile : non valid argument" under IE7 with appendTo under an iFrame

Reported by: dazz_x Owned by:
Priority: minor Milestone: 1.3.2
Component: unfiled Version: 1.3.2
Keywords: appendTo,IE Cc:
Blocking: Blocked by:

Description

(possibly related to #4059) Have an html page with 2 iframes. One is named "cible" When I try to append a dynamically created style element to the <head> section of the iframe's document (see attached file), IE7 throw the error htmlfile: non-valid argument it works well under FF3, Opera & Safari

The exception happens in a method named "clean", line 957 in jquery-1.3.2.js fragment.appendChild(ret[i]) [debug time - local variables stack =>] i=0, match is undefined, ret[0] is the dynamic style element, context is the good document, elems[0] is the style element too, and fragment seems to me very weird. it has nodeName #document-fragment, and the debugger shows error on particular fields

Attachments

jquery_bug.js Download (265 bytes) - added by dazz_x 5 years ago.
lines of code that throws the exception

Change History

Changed 5 years ago by dazz_x

lines of code that throws the exception

comment:1 Changed 5 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

You're creating the style elements in one document but appending them to another document. Try this instead:

  $(styleStr, doc).appendTo($('head',doc));

Reopen the ticket if the problem is still there.

comment:2 Changed 4 years ago by snover

#7208 is a duplicate of this ticket.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.