Opened 13 years ago
Closed 13 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?
Note: See
TracTickets for help on using
tickets.