AFAIK this has been discussed before, perhaps not seriously, but it's been discussed. And never went anywhere.
I'd love to see it included. Would be beneficial to many extension developers.
Posted by Robert Accettura at October 5, 2005 9:00 AMWell one thing I've found is many core Mozilla hackers like to do things the hard way. I even have this problem w/ the MDG team. They much prefer to do things the hard way. Why, I'm not sure. One complaint is that jsLib is a different API.
Also, the last thing we need is two split points of development of jsLib. I do wish there were more hackers helping me out w/ jsLib. I would devote a lot of time to it but need to make a living, so that's why development is slow going.
So that is the quagmire of jsLib.
--pete
Posted by Pete Collins at October 5, 2005 9:11 AMCalendar doesn't even use jsLib anymore. The files are just there because nobody took the time to remove them.
Posted by mvl at October 5, 2005 9:52 AMCalendar doesn't use JSLib anymore. As of bug 288045 it is no longer packaged.
Posted by Simon Paquet at October 5, 2005 10:00 AMThe problem is that there are, what, 90,000,000 installs of Firefox out there WITHOUT JSLib bundled. That means that to ensure that JSLib is present, you need to either require that it be installed before your extension works, or simply include it within your own extension. Unfortunately, JSLib is, according to the install page, 140 KB (it's not clear where the 64 KB savings for the Lite version comes from...). For many (most?) authors, that's simply an unacceptable amount of cruft to be adding to one's extension.
You could, I suppose, require a very, very, very bleeding-edge version of Firefox, but if JSLib was the only dependency, it's likely that someone else would simply take the extension and remove the JSLib bits with the XPCOM calls that are being wrapped.
Basically: the slightly-cleaner code that results from JSLib doesn't really outweigh the hassles resulting from JSLib's size and lack of installed base.
What about this, though: take JSLib's most useful wrappers, functions, and idioms, refactor them to minimize inter-module dependencies, and then post the functions and code snippets on developer.mozilla.org and/or kb.mozillazine.org or whatever wiki, allowing devs to pick-and-choose the functionality of JSLib they want at development time rather than at runtime... ?