jquery / sizzle

A sizzlin' hot selector engine.
https://sizzlejs.com
Other
6.29k stars 951 forks source link

Use Scalpel selector parser #398

Closed gajus closed 1 year ago

gajus commented 7 years ago

I have written a robust CSS selector parser.

https://github.com/gajus/scalpel

It does not cover the entire sizzle.js spec, however that would be a simple change. I am making Scalpel an extendable parser.

Would there be any interest from Sizzle team to integrate Scalpel should it cover the entire spec?

The main benefits would be a clear separation of concerns and robustness of the parser.

gajus commented 7 years ago

Looking at it again, Surgeon does cover the entire sizzle.js spec. Not sure why I thought otherwise.

gibson042 commented 7 years ago

I expect this would fail on some of our edge cases, or increase size, or hinder real-world performance, but the proof of the pudding is in the taste. If you file a pull request, I will consider it thoroughly.

That said, this project is approaching end-of-life, and it may not be worth the effort.

cibernox commented 7 years ago

@gibson042 May I ask, if sizzle is coming to EOL, is there some other project that is going to replace it or is this going to die without substitute? There is a lot of code out there relying on the selector's extensions like :contains and :eq from jQuery.

gibson042 commented 7 years ago

:contains will be supported by jQuery, but :eq will be dropped (and is already on the chopping block here, cf. #293).

cibernox commented 7 years ago

@gibson042 And will be possible to use the selector library independently of jquery?

mgol commented 1 year ago

We are about to archive Sizzle so bold issues like this one will definitely not be realized; closing.