ECSSTree #2328
-
ECSSTree is a library that is fully backwards compatible with CSSTree and enables easy parsing of Extended CSS language elements and handles problematic tokenization without any performance issues. Classic selectors can be used "natively" using ECSSTree, don't need quote marks: example.com##:contains(a'b)
example.com##:xpath(//*[contains(text(),"substring")]) In addition, ECSSTree knows most ExtendedCSS pseudo-classes. For example, while CSSTree parses Please see the details here: https://github.com/AdguardTeam/ecsstree#readme I originally opened this discussion for ideas when planning the library, but in the meantime the library was completed. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In the long term, I think I would prefer to move away from CSSTree library and create a custom parser using the same approach as the new filter parser code in uBO. The new parser code does not require expensive memory churning as the tree representation all fit into an integer array -- as opposed to CSSTree where nodes are |
Beta Was this translation helpful? Give feedback.
In the long term, I think I would prefer to move away from CSSTree library and create a custom parser using the same approach as the new filter parser code in uBO. The new parser code does not require expensive memory churning as the tree representation all fit into an integer array -- as opposed to CSSTree where nodes are
Object
whereas in the new parser nodes are sequences of integers into a single typed array.