Esta traducción está incompleta. Por favor, ayuda a traducir este artículo del inglés.
Firefox 9 no tiene una gran cantidad de cambios que deberian ser problemas de compatibilidad para los desarrolladores de add-ons. Sin embargo, hay algunos elementos posibles que puedan ser problematicos, así que vamos a echar un vistazo.
¿Es necesario hacer halgo?
Si se distribuye su add-on en addons.mozilla.org (AMO), ha sido verificado por una herramienta de verificación de compatibilidad automatizada. Add-ons que no utilice API que cambiaron en Firefox 8, y no tienen componentes binarios (que deben volver a compilar para cada versión importante de Firefox), automáticamente se han actualizado en AMO para indicar que funcionan en Firefox 9.
Así que usted debe empezar por visitando AMO y mirando para ver si su add-on requiere trabajo.
Add-ons que estan bootstrapped pueden quitar scripts de carga retrasada
Si su complemento usa {{ifmethod ("nsIChromeFrameMessageManager", "loadFrameScript")}} con el delayed-load disponido, el script se carga en todo cuadro creado a partir de ese momento. Esto es genial, excepto que desde Firefox 9, no había manera de detener la carga de el script, asi que que seguiria ocurriendo incluso después de que su add-on fue cerrado.
A partir de Firefox 9, debe llamar a el nuevo {{} ifmethod ("nsIChromeFrameMessageManager", "removeDelayedFrameScript")} método para detener la carga de el script en los nuevos cuadros. Esto se hace de esta manera, por ejemplo:
browser.messageManager.removeDelayedFrameScript("chrome://myextension/content/somescript.js");
Interface changes
- The
nsIURL
interface has been changed a bit. ThensIURL.param
attribute was removed, and thensIURLParser.parsePath()
method has two fewer arguments than it did previously. - Two methods have been removed from
nsIBrowserHistory
:registerOpenPage()
andunregisterOpenPage()
. These methods had been deprecated. - The
nsIEditorSpellCheck.saveDefaultDictionary()
method has been removed as part of supporting per-site spell check settings. Also,nsIEditorSpellCheck.updateCurrentDictionary()
no longer takes a parameter. - The
nsIGlobalHistory3
interface has been removed. Its functionality was of limited (if any) use to add-ons, so this shouldn't affect anyone. - Several specialized channels' properties attributes have been merged into the base
nsIChannel
interface. This shouldn't affect compatibility at all, since those interfaces inherit fromnsIChannel
anyway.
Preference changes
The geo.wifi.*
preferences no longer have default values, although they're honored if they exist. If your code reads these without handling the case where they don't exist, you need to update your code to handle the exception that gets thrown when they're not present.
XPConnect changes
nodePrincipal
and baseURIObject
have been moved from nsDOMClassInfo
to XrayWrapper
. This shouldn't affect many add-ons, since it would only be an issue if they try to access these properties on DOM Node
objects from unprivileged script that have requested XPConnect privileges using enablePrivilege()
.
DOM changes
- The long-obsolete method
Navigator.taintEnabled()
has been removed. This hasn't done anything useful in a very long time, but was often used in browser detection scripts, since it was Netscape-specific. Calling this method throws an exception starting in Firefox 9. - Event handlers are now implemented as standard IDL interfaces. For most cases, this won't affect you, but there are exceptions.
Other changes that may affect binary compatibility
These changes are notable in that they may affect binary XPCOM components. These will need rebuilding anyway, since that's required for every major release of Firefox, but could introduce compile-time errors, so they're worth noting in particular.
- The
nsIDOMHTMLDocument
interface now has a newscripts
attribute, which implements theDocument.scripts
attribute. - The
nsIJumpListShortcut.iconImageUri()
method has been added, to make it possible to establish favicons on jump list URI entries on Windows.
Theme changes
The pending
attribute has been added to the tab
element. If this attribute is present, the tab is in the process of being restored by the session store service. You can use that to style the tab during the restore process. It's worth noting that if the user has turned on the "Don't load tabs until selected" preference, the pending
attribute is set on tabs until they get loaded.
Similarly, tabs also now have an unread
attribute; this property, if present, indicates that the tab has changed since the last time it was the active tab. You can use this to style tabs differently when they have changed since the last time the user looked at them. This is also present on tabs that have not yet been looked at during the current session.