Firefox 4

TwitterFacebook
Get flash to fully experience Pearltrees
Firefox 4, which shipped on March 22, 2011, enhances performance, adds more support for HTML5 and other evolving Web technologies, and further improves security. This article provides information about this release and what features are available for Web developers, add-on developers, and Gecko platform developers alike. Features for web developers Gecko now uses the HTML5 parser, which fixes bugs, improves interoperability, and improves performance. https://developer.mozilla.org/en/Firefox_4_for_developers

Firefox 4 for developers - MDC

Notice that the module uses normal JavaScript to create functions, objects, constants and any other JavaScript type. The module also defines a special Array named EXPORTED_SYMBOLS . Any JavaScript item named in EXPORTED_SYMBOLS will be exported from the module and injected into the importing scope. For example: Components.utils.import("resource://app/my_module.jsm"); alert(foo()); // displays "foo" alert(bar.size + 3); // displays "6" alert(dummy); // displays "dummy is not defined" because 'dummy' was not exported from the module Note: When you're testing changes to a code module, be sure to change the application's build ID (e.g. the version) before your next test run; otherwise, you may find yourself running the previous version of your code module's code still.

Using JavaScript code modules - MDC

https://developer.mozilla.org/en/Using_JavaScript_code_modules
Mozilla is fighting poor performance in Firefox on many fronts. Firefox 3.6 was already a significant improvement over 3.5, and Firefox 4 promises to be lightning fast. However, Firefox is already pretty fast.

How to Improve Extension Startup Performance « Mozilla Add-ons Blog

http://blog.mozilla.com/addons/2010/06/14/improve-extension-startup-performance/
A little over a month ago I posted the first compatibility notice for add-on developers . http://blog.mozilla.org/addons/2010/08/31/compatibility-firefox-4-beta-4/

Add-on compatibility for Firefox 4 – beta 4 edition « Mozilla Add-ons Blog

Blog Archive » How we’re breaking some extensions in the near future

Posted: March 19th, 2010 You may have read some reports about how we’re re-implementing the bulk of the extension manager in Firefox. It’s been a long running project (something like a year since I first really started planning how to do it). Things are finally started to come together and all being well we are likely to look at landing the first pieces of this on the trunk nightlies in as little as a weeks time. I’ll be up front, this isn’t going to be a perfect landing. There may be some thing that are missing and other bits where the user experience isn’t as perfect as it will be finally. http://www.oxymoronical.com/blog/2010/03/How-were-breaking-some-extensions-in-the-near-future
The AddonManager object is the global API used to access information about add-ons installed in the application and to manipulate them. The majority of the methods are asynchronous meaning that results are delivered through callbacks passed to the method. The callbacks will be called just once but that may be before or after the method returns. One of the forces of the AddonManager is that it deals with any kind (type) of addon in generic manner. https://developer.mozilla.org/en/Addons/Add-on_Manager/AddonManager

AddonManager - MDC

Addon - MDC

An Addon represents an add-on that is either installed or can be installed. Instances can be created using the many getAddon methods on the AddonManager object. The interface can represent many different kinds of add-ons and as such some of the properties are considered "required" and others "optional" which means that the optional property may not exist on Addon instances for some types of add-ons. https://developer.mozilla.org/en/Addons/Add-on_Manager/Addon

AddonListener - MDC

https://developer.mozilla.org/en/Addons/Add-on_Manager/AddonListener AddonListeners can be registered with AddonManager.addAddonListener() and will then receive notification of changes to the add-ons currently installed. These notifications come in the form of calls to methods on the listener object. A listener only needs to implement the methods corresponding to the events it cares about, missing methods will not cause any problems.
InstallListeners are notified of an AddonInstall 's progress. They may be registered to hear events from all AddonInstall s through AddonManager.addInstallListener() or to a single AddonInstall through AddonInstall.addListener() Called when downloading begins for an add-on install.

InstallListener - MDC

https://developer.mozilla.org/en/Addons/Add-on_Manager/InstallListener

Code Samples - MDC

https://developer.mozilla.org/en/Addons/Add-on_Manager/Code_Samples Getting the directory where your addon is located If you need to determine the directory in which your add-on is installed, code like the following will do the trick. Simply replace YOUREXTENSIONID with your add-on's ID. Components.utils.import("resource://gre/modules/AddonManager.jsm"); AddonManager.getAddonByID("YOUREXTENSIONID", function(addon) { var addonLocation = addon.getResourceURI("").QueryInterface(Components.interfaces.nsIFileURL).file.path; });
An UpdateListener receives messages from an update check for a single add-on, though it is possible to pass the same UpdateListener to as many calls to Addon.findUpdates() as you like. For each individual update check the following methods will be called on the listener: Called when the update check found compatibility information for the application and platform version that the update check was being performed for. Called when the update check found no new compatibility information for the application and platform version that the update check was being performed for.

UpdateListener - MDC