Skip to main content

Bug Tracker

Side navigation

#12201 closed bug (wontfix)

Opened August 06, 2012 04:57AM UTC

Closed August 06, 2012 06:21PM UTC

Sizzle filter api incompatible when adding a custom pseudo selector

Reported by: Owned by:
Priority: low Milestone: None
Component: selector Version: 1.8rc1
Keywords: Cc:
Blocked by: Blocking:

This code works on 1.7.2 and fails on 1.8 RC1 with error

Uncaught TypeError: Cannot read property '3' of undefined.

$.extend($.expr[':'], {

someOp: function(a, i, m, s) {

var dist = parseInt(m[3]);


return false;



Attachments (0)
Change History (2)

Changed August 06, 2012 05:03AM UTC by comment:1

jsFiddle demonstrating the problem:

Changed August 06, 2012 06:21PM UTC by timmywil comment:2

component: unfiledselector
priority: undecidedlow
resolution: → wontfix
status: newclosed

The new way to create custom pseudos with arguments is much clearer and faster.

The documentation can be found here:

Your example adjusted to conform to the new API:

Custom pseudos that don't require arguments work the same way.