JSL :: JavaScript Standard Library

© Andrea Giammarchi

Update - New JSL Revision available

Today JavaScript is strongly used from web or intranet developers and there are a lot of libraries to add special effects, simple way to implement ajax, simple way to implement complex components, forms, tabs or everything else. These different libraries are really cool but there are some problems: I write components and some other usefull (at least for me) library and every time I need to find my "perfect" work around or fix. One day I've decieded to stop this horrible way to write JS code, that's why I've created the JSL.

What is the JSL ?

JSL is a single and small file ( IE4 compatible packed version: 7.77 Kb ) with some JavaScript 1.6 standard methods or functions that are not present on some browsers. Its goals is to forget work arounds for every library or script that's included on a web page. You could just add JSL even before your scripts to add portability or more compatibility, then you don't need to rewrite anything.

What's about compatibility ?

JSL is compatible with every browser that supports at least JavaScript 1.2 ( then is compatible with Safari, KDE, Internet Explorer 5, 5.5 and 4 too! ). Write your JavaScript standard code for FireFox 1.5 (for example ...) and run this code with every browser (at least with these core functions)

Which are JSL features ?

How to use JSL ?

Just write this piece of code before every script tag
<script type="text/javascript" src="JSL.js"><!--// (C) JSL //--></script>
If you have a lot of libraries/pages, subdomains or subfolders you should use an absolute URL to cache JSL file ( I mean ... doesn't copy JSL.js in every folder :-) ), then after first download this library will be "0 size".


Visit the Demo Page or Download JSL or, if you want, look at the unpacked Source Code

The documentation of these methods, top level functions or prototypes is the same defined by standard ECMAScript 3, if not or if you find some bug please contact me andrea at 3site dot it.