[Kss-devel] API change in base2
Jeroen Vloothuis
jeroen.vloothuis at xs4all.nl
Sun Mar 9 21:35:45 CET 2008
Balazs Ree wrote:
> On Sun, 09 Mar 2008 14:39:10 +0100, Malthe Borch wrote:
>
>
>> It seems in base2 1.0 beta, the matchAll-method has been renamed to
>> querySelectorAll. I changed this locally in dom.js:96 and it seems to
>> work.
>>
>> Note that this version of base2 is larger in size, but gzipped it's only
>> 1.5 kb more.
>>
>
> Thanks Malthe for spotting this! If there are no objections I would make
> the kss code test for both versions, this would allow it to operate with
> both api versions.
>
I was thinking about a way of making it possible to be less depended on
specific checks. The reason for this is that although jquery may seem a
bit slower it might be good enough for some (non Plone) applications. If
these applications already use jquery for something else they should not
have to drag in base2 just to use KSS.
The way I propose to handle this is to make a namespace for utility
functions like CSS selectors. We could also put handy functions like
forEach etc. in there (which in most cases would just be aliases to the
functions from base2 / jquery etc.).
If we implement it like this you would just need to toggle which
javascript file is loaded (using the plugin system).
More information about the Kss-devel
mailing list