JavaScript modules in a JAR file - finally! · 2010-06-18 10:45 by Wladimir Palant

I don’t know why nobody announced this yet, a very important change landed on mozilla-central a few days ago. JavaScript modules can now be located in JAR files and loaded directly via chrome:// URLs. So an extension can now keep its modules in the JAR file along with all the other code. This has several advantages: more efficient compression, fewer files to sign if the extension is signed, fewer files to read in when Firefox starts up. And you no longer need to register resource:// “domains” for your extension (this makes the extension detectable from the web, something that isn’t always desirable).

Even though it will take a year or two until I can fully benefit from this change in Adblock Plus — it is really good that this finally happened. Many thanks to Michael Wu!

Tags:

Comment [3]

  1. ABPfans · 2010-06-18 20:10 · #

    Thanks your developing and please keep going!
    I need ABP and like it very much.

  2. pd · 2010-06-18 21:18 · #

    Sounds like the sort core work that often goes unheralded when it’s done but might be hyped down the track. In this sense it’s great to see people acknowledging the code when the hard work is in front of mind for the devs.

    taking one step back, what are JavaScript modules exactly? Could you provide a few references for those who came in late?

  3. Mark Finkle · 2010-06-19 19:42 · #

    @pd – See: https://developer.mozilla.org/en/JavaScript_code_modules

Commenting is closed for this article.