FUEL is the little library that John Resig and I are working on which should make developing extensions a little easier. It’s been a while since we last talked about it so I thought an update was in order.
FUEL now has a place in the Mozilla CVS tree (browser/fuel) and development is happening in a branch (FUEL_DEVEL_BRANCH). We have been tweaking the API (0.1 and 0.2) a little over the past couple weeks. We have also added some information on the testing plan. We are using the Mochitest framework to run our unit tests.
So far, we have the basics parts in place, including:
- Global
Application
object. - Ability to associate user data with the
Application
andExtension
. No more hidden window hacks. - Easy access to preferences, again global with
Application
and per extension withExtension
. The extension-based preferences automatically use an “extensions.your-ext.” branch. - Simple events for
Application
(“start”, “ready”, “quit”) andExtension
(“install”, “uninstall”). Events can also be used to watch for changes on preferences and storage items.
We hope to get the code and tests ready for review this week. Then we can get something pushed to the trunk after that. As always, feedback is welcome – comments, email, IRC, or Wiki.
uh ? browser/fuel ?? Why not in the toolkit directory ?? All of the API of 0.1 version could be VERY usefull for any application ! I want this into xulrunner ! 🙂
Please split your api in two directories . For example :
– application, events, extensions, preferences, file I/O, storage, applicationstorage into toolkit/ content/fuel/
– sessionstorage, browser, bookmarks, into browser/fuel ( or why not browser/base/content/fuel )
Thanks 🙂
Please change the API to use addEventListener instead of addEvent. The latter is inconsistent and doesn’t make sense.
… that is, please make FUEL implement the EventTarget interface.
Great, can’t wait to get my grubby hands on it!
I don’t think FUEL should go in toolkit — yet. Let it serve one master well, not be a house divided (or pretend to serve many masters, which can be even more frustrating).
I agree with Dao. As JS perpetrator, it’s always driven me crazy when people mix up event and handler or listener. “onclick” is a handler, not an “event” — “click” is the event name.
/be