I'm trying to migrate away from another jQuery plugin, which has several bugs, to this, which doesn't have either of those bugs. 👍
But, looking through the code, there appears to a fair bit of code devoted to parsing the selector, which seems fragile. More importantly, nodes are matched with Element.matches, which means that jQuery-specific features like :visible won't work, and jQuery extensions like :not only partially work.
Since it's a jQuery plugin, why not just use $(node).is(selector) instead of Element.matches + custom parsing?
I'm trying to migrate away from another jQuery plugin, which has several bugs, to this, which doesn't have either of those bugs. 👍
But, looking through the code, there appears to a fair bit of code devoted to parsing the selector, which seems fragile. More importantly, nodes are matched with
Element.matches, which means that jQuery-specific features like:visiblewon't work, and jQuery extensions like:notonly partially work.Since it's a jQuery plugin, why not just use
$(node).is(selector)instead ofElement.matches+ custom parsing?