mythz/jquip

.find() on mult-root document fragment gives warnings

Closed this issue · 0 comments

Calling .find() on a document fragment with multiple roots will give TypeError:undefined_method warnings. For example:

$('<p>foo</p> <p class="yo">bar</p>').find('.yo')

The issue stems from the space character between the two <p> tags. That is considered to be a Text node and doesn't provide querySelectorAll as requested on jquip.js:534.

This only gives warnings and does not break functionality. However, limiting the number of exceptions occurring inside jquip could be a good thing.