Bug Tracker

Opened 12 years ago

Closed 12 years ago

#8476 closed bug (invalid)

Strange behavior with appendTo

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:



I'm trying to create my first jQuery plugin, a "game of fifteen" (taquin in french) and everything is fine except I have a very strange behavior when using the appendTo method.

Firebug throws the following exception : uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMDocumentFragment.appendChild]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://code.jquery.com/jquery-1.5.1.js :: anonymous :: line 5636" data: no]

Here is a test case. To reproduce the bug, click Start once, then Reset twice. It will trigger on the second reset (with any settings). Reset just rebuild the board game, keeping the same settings.

While debugging myself, I've noticed that on line 5558 of jQuery 1.5.1 (method "clean") there is this array created : "var ret = [];". When the bug triggers, if you put a break point after this line, the array is shown as empty in the firebug spy window, but if you open the spy, you can see that there are "1" in the array; one for each time the bug triggered. This is what drives jQuery crazy.

Change History (1)

comment:1 Changed 12 years ago by dmethvin

Resolution: invalid
Status: newclosed

That is WAY too much code for a bug report.

It looks like you are trying to .load() HTML into an img element, which cannot have children.

If that is not the problem, or you have other questions, ask for help on forum.jquery.com.

Note: See TracTickets for help on using tickets.