Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Actualizando add-ons para Firefox 9

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.

Nota: Aún deberia probar su add-on en Firefox 9, incluso si se ha actualizado automáticamente. Hay casos raros que no se pueden detectar de forma automática.
Ya que haya confirmado que necesitas hacer cambios, vuelva de nuevo a esta página y siga leyendo.
 

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

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.

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.

Etiquetas y colaboradores del documento

 Colaboradores en esta página: Rickatomato
 Última actualización por: Rickatomato,