Skip to main content

Bug Tracker

Side navigation

#3737 closed bug (fixed)

Opened December 22, 2008 11:47PM UTC

Closed January 10, 2009 01:08AM UTC

TypeError: ret[i].parentNode is null

Reported by: malsup Owned by: flesler
Priority: major Milestone: 1.3
Component: core Version:
Keywords: Cc: malsup
Blocked by: Blocking:
Description

TypeError occurred at line 1017 of 1.3b1 while using Taconite plugin to inject a script element into the document head.

This screenshot shows the error in Firebug:

http://jquery.malsup.com/test13/test-taconite.png

Test page here:

http://localhost:8888/malsup/test13/test-taconite-1.3b1.html

Same test using 1.2.6:

http://localhost:8888/malsup/test13/test-taconite-1.2.6.html

I tried for quite a while to prepare a small test case but couldn't seem to get the same error to occur without using Taconite. :-(

Attachments (0)
Change History (7)

Changed December 22, 2008 11:54PM UTC by malsup comment:1

Changed December 23, 2008 06:08PM UTC by dmethvin comment:2

need: ReviewPatch
owner: → flesler

The problem only occurs if a script DOM element is passed into jQuery.clean:

  $(document.createElement("script")).appendTo("head");

The script processing at line 994 only happens if the incoming argument is a string; it needs to be moved outside that test ... er, somehow. :-)

Changed December 25, 2008 09:21PM UTC by flesler comment:3

cc: → malsup
need: PatchCommit
status: newassigned

Changed December 25, 2008 09:21PM UTC by flesler comment:4

resolution: → fixed
status: assignedclosed

Fixed at [6004].

Changed January 06, 2009 10:39PM UTC by Leeoniya comment:5

resolution: fixed
status: closedreopened

broken again in b2 :(

Changed January 07, 2009 01:09AM UTC by malsup comment:6

I created a simpler test case for this. The problem is in the assumption that a script element has a parent node. This is not true for script elements that have been created but not inserted into the DOM.

http://jquery.malsup.com/test13/test-script-1.3b2.html

Changed January 10, 2009 01:08AM UTC by john comment:7

resolution: → fixed
status: reopenedclosed

Fixed in SVN rev [6078].