Modernizing Prototype.js

I pretty much use prototype.js in every web project.

Nowadays, though, there are native javascript functions that would avoid reinventing the wheel and IE is not a problem anymore, if even Microsoft is abandoning it :). For instance, I prefer to rely on querySelectorAll() instead of using a js library like Sizzle.

That is why I’ve forked prototype and started trimming it down. At the moment it’s almost half its original size (Sizzle took up a lot of code) and it still passes all its tests, albeit with a few minor changes: e.g. you need to quote values in CSS attribute selectors:

1
$$( 'foo[bar="baz"]' )

instead of

1
$$( 'foo[bar=baz]' )

You’ll find my fork on GitHub

Leave a Reply

Your email address will not be published. Required fields are marked *