derive a dom selector lib · Issue #32 · leeoniya/dropcss · GitHub
Skip to content

derive a dom selector lib #32

Description

@leeoniya

DropCSS already contains the vast majority of the machinery necessary to create something akin to these libs:

https://github.com/fb55/css-select
https://github.com/jquery/sizzle
https://github.com/dperini/nwmatcher

the amount of additional code/tweaks should be quite small to get this working and there's a reasonable chance that a selector engine built using DropCSS's innards would be very competative in speed and definitely size. Sizzle is 19.4KB (min) while DropCSS is 9.55KB (min) which includes an HTML parser [1] and post-processor [2] that can mostly be ditched.

[1] https://github.com/leeoniya/dropcss/blob/master/src/html.js
[2] https://github.com/leeoniya/dropcss/blob/master/src/postproc.js

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions