Skip to main content

Bug Tracker

Side navigation

#968 closed enhancement (fixed)

Opened February 16, 2007 12:33AM UTC

Closed September 08, 2007 08:00PM UTC

$('<tag>') needs optional document parameter to ease cross-frame DOM wrangling

Reported by: rrudenko@toppro.net Owned by:
Priority: minor Milestone: 1.2
Component: core Version: 1.1.4
Keywords: frames cross Cc:
Blocked by: Blocking:
Description

When a user creates a DOM element via $('<tag>'), the element would always reside in current document. This makes $() function unusable for DOM creation when nodes are supposed to be added to some other document (different frame or window). I suggest allowing an optional parameter to node constructor, e.g. $('<tag>', document) to allow cross-frame DOM creation.

Testcase that demonstrates the issue in browsers that enforce prohibition on cross-document node moving (IE, FF3 alpha):

http://pastebin.ca/357832

Attachments (0)
Change History (3)

Changed March 24, 2007 05:50PM UTC by john comment:1

need: → Test Case

Changed March 25, 2007 11:04AM UTC by joern comment:2

need: Test CasePatch

Added test in [1585].

Changed September 08, 2007 08:00PM UTC by john comment:3

description: When a user creates a DOM element via $('<tag>'), the element would always reside in current document. This makes $() function unusable for DOM creation when nodes are supposed to be added to some other document (different frame or window). I suggest allowing an optional parameter to node constructor, e.g. $('<tag>', document) to allow cross-frame DOM creation.\ \ Testcase that demonstrates the issue in browsers that enforce prohibition on cross-document node moving (IE, FF3 alpha):\ http://pastebin.ca/357832When a user creates a DOM element via $('<tag>'), the element would always reside in current document. This makes $() function unusable for DOM creation when nodes are supposed to be added to some other document (different frame or window). I suggest allowing an optional parameter to node constructor, e.g. $('<tag>', document) to allow cross-frame DOM creation. \ \ Testcase that demonstrates the issue in browsers that enforce prohibition on cross-document node moving (IE, FF3 alpha): \ http://pastebin.ca/357832
milestone: → 1.2
resolution: → fixed
status: newclosed
version: → 1.1.4

Fixed in SVN.