Are there javascript libraries that provide forward compatibility with particular implementations? For example, such a library could provide features present in JavaScript 1.6 in a way that’s portable across various browsers. It should take advantage of native support for that functionality when available.
Some of the frameworks like JQuery or Prototype provide features that are identical to features in newer versions of JS, but I’d like to both cut down on the size of the library I’m using and ensure full compliance with a standard or published version.
Do libraries such as this exist? Google and wikipedia don’t have much to say on this topic.
It looks like there is such a library: the “JavaScript Standard Library” (JSL). It purports to provide as much JS 1.6 compatibility as possible for browsers supporting JS 1.2 or later.
I haven’t used it, and am not sure of how well it works. The documentation is written in sketchy English; this could indicate a lack of widespread usage, since otherwise someone probably would have corrected it by now.
To add to the confusion, the site links to a JSL Revision, located on a different website, whose features list indicates that it provides a subset of the features listed at the main page.
The author has written some more about this library and about the general concepts involved in this blog post.