Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Standardize custom pseudo object #2073
The Sizzle pseudos object is exposed on
Sizzle defines the first two, and jQuery defines the third.
None of them appear in the current jQuery documentation, though Sizzle documents the object as
So now that this issue affects three source repositories and jquery/api.jquery.com, here's the crux of it: can we standardize on one internally and deprecate the others? All things considered, my vote would be on
I actually would like to keep them all.
Regardless, I'd like to continue recommending the use of the .createPseudo() method for creating custom selectors, making the choice of one property somewhat moot – except for
In the sense of not moving to deprecated, or of not standardizing?
But still exceedingly rare from (among other things) its lack of documentation, and with a fix that couldn't be simpler. At any rate, though, I propose deprecation not because I think we can remove them anytime soon, but to promote consistency.
That would depend on your measurement criteria... it's probably the most used by execution count from jQuery UI alone. And to the extent that any such special-case functionality can be used "much", I bet updating api.jquery.com would address the educational gap.
Then it appears NWMatcher has moved on, at least from an API perspective (which is what I'm addressing). However, even if it hadn't, maintaining surface area in jQuery core to support transitioning from an independent selector engine seems... overaccommodating.
Not at all; the result of
I think we're on different wavelengths here. In terms of defining custom pseudos, you said jQuery UI mostly used
Totally true. Brain fart. However, the main point there was
I'm all for documenting custom pseudo creation in jQuery (and I'm fine picking a property and sticking with it), but I still don't see the value behind deprecating the other properties. To me, deprecation voices the intention of removal whether we say it does or not. If we use the same property in all of our documentation, that seems like enough.