Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13059 closed bug (notabug)

jQuery `find` doesn't work on document fragments

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:


When working with a document fragment, when you try to $(docFrag).find('div') it does not work, however, $(docFrag).children('div') it does.

This is because a document fragment has childNodes but doesn't have a query selector all.

Change History (2)

comment:1 Changed 10 years ago by Rick Waldron

Resolution: notabug
Status: newclosed

jQuery(...) doesn't support document fragments like this: (http://api.jquery.com/jquery/)

comment:2 Changed 10 years ago by dmethvin

Yeah, we don't have any test cases for users passing document fragments into the API, we just use them internally and even at that we use it less than before since the frag cache is gone.

All of the exceptions having to do with document fragments most likely mean we'd never support them as incoming parameters to the API. If you would like to advocate this, I think the first step would be for you to survey the code and experiment to see all the places where we'd need to change our assumptions.

Note: See TracTickets for help on using tickets.