I was going to start doing some actual work on the extension tonight, and investigate the new database support in Firefox (I think this is something that will be very useful)…

Instead, I started dealing with one of my pet Javascript peeves. I hate having to put multiple <script> tags in my code to include lots of JS files. If one piece of Javascript depends on another piece of Javascript then I WANT IT TO SAY SO!

I’d hoped that someone else would’ve figured out a neat way of doing this by now, but they haven’t (dojo comes close, but it’s not good enough).

Here’s what I want…

  1. import(”org.getbooksmarts.SomeClass”) should load the JS at org/getbooksmarts/SomeClass.js from the root.
  2. the root should be definable by a parameter
  3. my importer should be able to start my other js. It should act as a bootstrap loader using something like <script src="import.js?main=org.getbooksmarts.Booksmarts">
  4. ideally it will work in chrome and html, but I can live with just chrome for now

It’s conceptually not too hard. The addition of new JS files is done by adding new <script> tags into the DOM. That works fine in HTML, I’m just having trouble in chrome for some reason.

This is why Venkman. Everyone thinking about developing extensions NEEDS the Mozilla Javascript debugger. This is not an optional step.