Bug Tracker

Opened 10 years ago

Closed 10 years ago

#5617 closed feature (wontfix)

feature request: support iframe traversal through selectors

Reported by: paul Owned by: john
Priority: major Milestone: 1.4
Component: selector Version: 1.4
Keywords: Cc:
Blocked by: Blocking:

Description

Currently, the syntax to query iframes looks like this:

$('#someIframe').contents().find('p').addClass('error')

which isn't too bad. However, I think another abstraction could really fit into our core philosophy, which is transforming the above into this:

$('#someIframe p').addClass('error');

I think it wouldn't add much overhead to Sizzle / jQuery, a simple check if nodeName equals iframe, and then changing the actual DOM element representation for further queuries down the selector to the contentDocument.

Additionally, make browsing up possible:

$(document).parent()

Yay / Nay?

Change History (1)

comment:1 Changed 10 years ago by john

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.