[Kss-devel] can KSS bindings become dynamic by borring livequery algorithm?

Brandon Craig Rhodes brandon at rhodesmill.org
Wed Apr 23 18:59:32 CEST 2008


My JavaScript competency is not yet great enough for me to determine
this on my own, so I will ask here on the KSS list and hope that
someone who knows KSS far better can spend a few minutes coming up
with the answer. :-)

I notice three facts:

 - People would like KSS to rebind events dynamically as the DOM
   changes, just like CSS does, so that as classes and properties come
   and go on objects, the KSS event bindings adjust to compensate.

 - This has not been implemented because, among other things, it looks
   very costly and confusing:

      http://kssproject.org/notes/plan-to-make-events-rebindable/

 - But a friend just told me about LiveQuery, which looks to my
   untrained eyes as though it does for jQuery what we would like to
   do for KSS: allow on-the-fly event rebinding as DOM attributes
   change.  Someone who's used it says it's not at all slow, which
   makes me wonder if its author has done something clever that KSS
   could do as well.  (But then again, maybe its selectors are far
   more restricted than KSS selectors or something, and I just haven't
   seen that yet?)

 - LiveQuery is distributed under the MIT license (as well as the
   GPL), which I think means that we could borrow what of its code we
   need?  Because I'm not suggesting that KSS become dependent on all
   of jQuery, just that this bit of its code could show us the way to
   do this in KSS.

Anyway, a Google search for KSS and LiveQuery together returned
nothing, so I hope that if this suggestion is impractical, it's at
least not something that's already been suggested and rejected. :-)

-- 
Brandon Craig Rhodes   brandon at rhodesmill.org   http://rhodesmill.org/brandon



More information about the Kss-devel mailing list