Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13059 closed bug (notabug)

jQuery `find` doesn't work on document fragments

Reported by: amcdaniel2@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:

Description

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 7 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 7 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.