-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Closed
Description
The Sizzle pseudos object is exposed on jQuery.expr as three distinct properties:
jQuery.expr.pseudosjQuery.expr.filtersjQuery.expr[":"]
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 pseudos (and separately documents the related setFilters), and I'm sure we have published instructions on how to define a custom pseudo at least once, which would necessarily reference one of them. We also have internal uses in at least two libraries:
- core
- defines
jQuery.expr[":"]fromjQuery.expr.pseudos - defines :hidden, :visible, and :animated by extending
jQuery.expr.filters - calls
jQuery.expr.filters.hiddenin the :visible pseudo
- defines
- UI
- defines :data, :focusable, :tabbable, and widget pseudos by extending
$.expr[ ":" ] - replaces the :animated filter at
$.expr.filters.animated - calls
$.expr.filters.visibleand$.expr.filters.hidden
- defines :data, :focusable, :tabbable, and widget pseudos by extending
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 filters.