Skip to main content

Bug Tracker

Side navigation

#13059 closed bug (notabug)

Opened December 14, 2012 09:36PM UTC

Closed December 14, 2012 09:47PM UTC

Last modified December 14, 2012 10:11PM UTC

jQuery `find` doesn't work on document fragments

Reported by: amcdaniel2@gmail.com 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.

Attachments (0)
Change History (2)

Changed December 14, 2012 09:47PM UTC by rwaldron comment:1

resolution: → notabug
status: newclosed

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

Changed December 14, 2012 10:11PM UTC by dmethvin comment:2

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.