📜 ⬆️ ⬇️

Compatibility of add-ons with Firefox 4: time to start

As many of you are already well aware of, the first beta of Firefox 4 was released a few weeks ago. Very soon it will be followed by the second one, and the final version is expected later this year . This relatively long transition period benefits developers of add-ons, as it gives us a lot of time to update and check our extensions for Firefox 4. On the other hand, this new significant release will flaunt a lot of new features, and break many of the things we need. that updating most add-ons to support it will not be an easy task. This blog post is one of many knowledgeable developers about compatibility with Firefox 4.

First of all, MDC is your friend: “ Firefox 4 for developers ”. This is a document that should and will contain all the information needed by web developers and add-on developers who have surrounded Firefox 4. Make sure you visit this document regularly and look for changes in it. If you are aware of anything missing in this document - let us know.

And here are a few key pieces from this document.
')

New add-on manager object


The nsIExtensionManager interface is no longer there, as is its RDF backside. Add-on information will now be stored in the SQLite database, and the add-on manager will become a JS module called AddonManager .

The key difference of this new interface is that the add-on data requests will now become asynchronous . This also applies to the FUEL library, so every addition that requests information about the additions will affect this change. The situation with those additions that need to obtain this data and deal with them during the launch will be especially delicate. However, if you are also trying to follow our recommendations on speeding up the initial load , then you should have a good idea to plan the process of launching the extension as asynchronous.

XPCOM Registration


A lot happens in this area: XPCOM will change to Gecko 2.0 , and none of your components will work until you take these changes into account.

Components should now be explicitly declared in the “chrome.manifest” file. Multiple boot events eliminated; the only thing left, the observation of which has always been recommended: "profile-after-change". And observers (listeners) and registration in categories will also need to be specified in the manifest - and, as a result , some category names are changed.

Changes to the tabbrowser element


The TabClose, TabSelect, and TabOpen events no longer pop up to the level of the tabbrowser element, also known as “gBrowser”. Event listeners that track these events should now be added to the “gBrowser.tabContainer” object.

Remote XUL is canceled.


Remote XUL (remote XUL) is a rarely used feature in Gecko-based browsers that allowed developers to create websites using XUL instead of HTML. Since support for the XUL language was limited to several browsers, there was little point in writing websites on it. However, it was successfully used in a few internal business applications (also metaphorically known as “dark matter”).

Remote XUL was very difficult to maintain, moreover, it was the source of numerous bugs and security problems. For this, remote XUL will be removed from Firefox 4. Fortunately, HTML 5 already includes a fairly abundant box model , so that the main loss for web developers will be the inability to use XBL in the future. If you're wondering what will happen with XBL 2, know: eliminating a remote XUL was a necessary step towards implementing XBL 2.

Theme and user interface changes


On these issues you will have to frequently and re-inquire, since there are many ambitious plans about Firefox 4 UI. Whether some of these changes will actually be realized or not depends on whether there is time and whether the correct consensus is found.

The main document about these UI changes is the Mozilla wiki: “ UX Priorities for Firefox 3.7 ”. Here are some important changes you should be aware of:

Other changes


As you can see, there is a lot of work to be done to achieve compatibility with Firefox 4, so now is a good time to start it. However, keep in mind that the development of Firefox 4 largely continues it, so that further changes are likely to occur. Do not think that you can create the final version of your add-on for Firefox 4, based only on the first beta. I recommend that you take the time to get up-to-date on the latest Firefox 4 news.

And, of course, there will be many good new products that will allow you to do amazing things in your expansion - including animation (2D and 3D), multithreading and interaction with system libraries. " Firefox 4 for developers " suddenly order a friend for you. And the Hacks blog is also a good review.

Source: https://habr.com/ru/post/99805/


All Articles