Modify ↓
Ticket #968 (closed enhancement: fixed)
$('<tag>') needs optional document parameter to ease cross-frame DOM wrangling
| Reported by: | rrudenko@… | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.2 |
| Component: | core | Version: | 1.1.4 |
| Keywords: | frames cross | Cc: | |
| Blocking: | Blocked by: |
Description (last modified by john) (diff)
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
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.
