The subscription model behind CSS selectors?
- by Martin Kristiansen
With CSS selectors a query string body > h1.span subscribes to a specific type of nodes in the tree. Does anyone know how this is done?
Selectors for transformations, how does the browser select the result set? And is there a trick to making it efficient?
I imagine there being some sort of hierarchical type-tree for the entire structure to which the nodes subscribe and which is what is used when doing the selector queries — but this is only a guess.
Does anyone know the real answer? Or even more interesting, what would be the best way to do dynamic lookups on a tree based on jQuery/CSS search queries?