Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#3948 closed bug (invalid)

wrap() throws NS_ERROR_DOM_HIERARCHY_REQUEST_ERR exception

Reported by: dmuir Owned by:
Priority: minor Milestone: 1.3.1
Component: core Version: 1.3
Keywords: wrap, wrapAll Cc:
Blocked by: Blocking:


wrapping an element in the document tree throws an exception in Firefox

sample from my code:

var wrapper = $('<div></div>');
//$this refers to "$(this)" where "this" is a select element

//this doesn't work either:

same issue with wrapAll()

Didn't work in 1.3 either.

from Firebug console: uncaught exception: Node cannot be inserted at the specified point in the hierarchy (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR) [Break on this error] fragment.appendChild( ret[i] ); jquery-1.3.1.js (line 948)

Change History (2)

comment:1 Changed 14 years ago by ziegenberg

Also occurs when using the wtooltip plugin http://wayfarerweb.com/wtooltip.php with ajax. The ajax GET returns a simple table like:

<tr><td>2009-05-13 14:36:41</td> <td>Getting source from SVN</td></tr>

comment:2 Changed 14 years ago by dmethvin

Component: unfilledcore
Priority: majorminor
Resolution: invalid
Status: newclosed

You can't wrap an element unless it's in the document, since wrapping it requires a parent node.

Note: See TracTickets for help on using tickets.