Wednesday, August 16th, 2006

liberty: basic javascript library

Category: JavaScript, Library

Andreas Kalsch of uniAjax has released a mini JavaScript library called liberty that has some recognizable functions ($()) but some new ones:

  • Number.prototype.setInRange(from, to)
  • getElements(tagName, attribute, value)
  • addHandler(elements, types, handler)

Whenever I see duplicate functions (e.g. $() again) it makes me wish that we could have a real way to share javascript libraries between apps. We have talked about script library=”prototype” version=”1.4″ in the past, and others are trying to do this via shared repos. If the browsers were in on the game they could save JIT’d copies of popular libraries.

Posted by Dion Almaer at 10:56 am
2 Comments

+++--
3.1 rating from 37 votes

2 Comments »

Comments feed TrackBack URI

I’ve often wished that there was a way to tell a browser “compile this bit – I’m not going to change it, so please compile it”, to make things a little quicker.

I use my own library for my own sites, which I’ve been developing steadily for – well, forever.

I would have loved to have had prototype, etc, back when I was starting, and even now, I find that I’m taking ideas from the prototype library and incorporating them into my own work ($() – fantastic).

I wish I could release my own work as a solid library, but it is unfortunately very tightly tied into how my CMS works, so I can only release the ideas a bit at a time.

/me looks forward to compilable javascript and browser-provided copies of some libraries.

Actually – I just thought of something – Firefox allows extensions, as do other browsers – would it not be possible to provide an extension which was basically a copy of the library in question, so that the next time prototype (eg) was requested, it would come from the extension instead of online? Of course, that would cause problems in some cases if the libraries were hacked for site-compatibility purposes, but it should help a little.

Comment by Kae Verens — August 17, 2006

[…] Persönliche Quelle: Ajaxian.com […]

Pingback by AJAX Portal.de » Blog Archiv » liberty Javascript basic library v0.1 released — September 9, 2006

Leave a comment

You must be logged in to post a comment.