Add-ons/developer/communication: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
m (edits)
m (update migration paths)
Line 1: Line 1:
=Evolution in Add-on Development=
=Evolution in Add-on Development=
[https://wiki.mozilla.org/WebExtensions WebExtensions] are becoming the standard for add-on development in Firefox. At the same time, [https://developer.mozilla.org/Add-ons/Working_with_multiprocess_Firefox multiprocess Firefox] (aka Electrolysis, or e10s) is also rolling out. These changes impact developers of XUL/XPCOM and SDK add-ons (some more than others), so we've created resources here to help ease the transitions.  
[[WebExtensions|WebExtensions]] are becoming the standard for add-on development in Firefox. It will be the only type of add-on supported in Firefox by the end of 2017.  


This page contains timelines, migration paths, tutorials, and more. If you're a new developer and would like create an add-on, please head over to [https://developer.mozilla.org/Add-ons/WebExtensions MDN].
This page contains timelines, tutorials, and other resources to help you port your add-on to WebExtensions. If you're looking for resources on creating a new add-on, please head over to [https://developer.mozilla.org/en-US/Add-ons/WebExtensions MDN].
 
=====Find out if you are affected=====
*Look up your add-on with the [https://compatibility-lookup.services.mozilla.com/ compatibility checker] to see if it's impacted.
*Use this [https://docs.google.com/drawings/d/1WVUSlU6UDJhr0xsgONS2kM1PohlHIJcrn_6qEE-_dTU/edit diagram] to see which migration group applies to you.
*Read through the [https://wiki.mozilla.org/Add-ons/developer/communication#Developers_who_are_affected_by_the_changes migration descriptions] below.


=====What's New=====
=====What's New=====
*[http://webextensions-experiments.readthedocs.io/ WebExtension Experiments]: prototype WebExtension APIs without having to build Firefox
*[http://webextensions-experiments.readthedocs.io/ WebExtensions Experiments]: prototype WebExtension APIs without having to build Firefox
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Embedded_WebExtensions Embedded WebExtensions]: we're making it easier to port to WebExtensions in Firefox 51
*Help plan and prioritize WebExtensions APIs by joining the new bi-weekly [[Add-ons/Contribute/Triage|public triage]].
*Help plan and prioritize WebExtensions APIs by joining the bi-weekly [https://wiki.mozilla.org/Add-ons/Contribute/Triage public triage]
*Thanks to [https://github.com/aterranova-bv aterranova-bv] for the new [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Examples#Emoji_Substitution Emoji Substitution WebExtension Example]!
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Porting_a_legacy_Firefox_add-on Porting guides that map SDK and XUL APIs to available WebExtensions APIs]
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions How-to guides] covering common add-on developer cases, like [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Intercept_HTTP_requests intercepting web requests] and [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Add_a_button_to_the_toolbar adding a button to the toolbar]


=Timelines & Roadmap=
=Timelines & Roadmaps=
*See a [https://docs.google.com/spreadsheets/d/1OFYrrvAFg8y1mZOEbuIR1axxtV8eul_be6ad9fe8JB0/edit#gid=1952061950 graph of upcoming multiprocess Firefox (e10s) changes], organized by Firefox release dates.
*[https://trello.com/b/ZpIDuMAW/addon-planning Add-on planning]: see what the add-on team is working on
*Public Trello boards:
*[https://trello.com/b/MwClom9J/addon-impacting-changes Impacting changes]: see what changes are coming up that impact compatibility
**[https://trello.com/b/ZpIDuMAW/addon-planning Add-on planning]: see what the add-ons team is working on
*[https://trello.com/b/PC9kB14s/webextensions-roadmap WebExtensions Roadmap]: see which APIs are coming up
**[https://trello.com/b/MwClom9J/addon-impacting-changes Impacting changes]: see what changes are coming up that impact compatibility
**[https://trello.com/b/PC9kB14s/webextensions-roadmap WebExtensions Roadmap]: see which APIs are coming up


=Migration paths for developers affected by the changes=
=Migration paths for developers of legacy add-ons=
==1) Has SDK add-on using low level APIs==
=====1) SDK add-on=====
Developers who created an SDK add-on using [https://developer.mozilla.org/Add-ons/SDK/Low-Level_APIs low-level APIs], which break with multiprocess Firefox (aka Electrolysis or e10s).
Here is the comparison chart showing [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK SDK APIs and their WebExtensions counterparts]. If you don't see the APIs you need to port to WebExtensions, please take a look at [https://wiki.mozilla.org/index.php?title=Add-ons/developer/communication/nov2016_update&action=edit#Don.27t_See_the_WebExtensions_APIs_You_Need.3F some more] options below.
=====Migration Path=====
If your add-on code accesses web content using a [https://developer.mozilla.org/Add-ons/SDK/Low-Level_APIs low-level SDK APIs] like window/utils or tabs/utils, then you will likely be affected.<br />
'''''Multiprocess Firefox is currently going through a phased roll-out through early 2017, so we urge you to [https://developer.mozilla.org/Add-ons/SDK/Guides/Multiprocess_Firefox_and_the_SDK test your add-ons] for compatibility.'''''<br />


*'''If it breaks''' in multiprocess Firefox, your users will be impacted, and you will need to update your add-on. You can find documentation on how to make them compatible [https://developer.mozilla.org/en-US/Add-ons/Working_with_multiprocess_Firefox here].<br />
=====2) XUL or XPCOM add-on=====
*'''If it does not break''' in multiprocess Firefox, you should add the [https://developer.mozilla.org/Add-ons/SDK/Tools/package_json#Key_reference <code>multiprocess</code> permission] in package.json.
Here is the comparison chart showing [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions XUL/XPCOM APIs and their WebExtensions counterparts]. If you don't see the APIs you need to port to WebExtensions, please take a look at some [https://wiki.mozilla.org/index.php?title=Add-ons/developer/communication/nov2016_update&action=edit#Don.27t_See_the_WebExtensions_APIs_You_Need.3F more options] below.


For assistance, please join the [https://mail.mozilla.org/listinfo/dev-addons dev-addons@mozilla.org] mailing list and ask for help!
=Don't See the WebExtensions APIs You Need?=


==2) Has SDK add-on using legacy APIs==
*If you're experienced with Mozilla infrastructure and would like to develop WebExtensions APIs directly for Firefox, here is a list of [https://mzl.la/2dVs5Ys approved APIs] that you can start contributing to.
Developers who created an SDK add-on, but uses either XPCOM or other legacy APIs.


=====Migration Path=====
*If you want to prototype and tinker with WebExtensions APIs without having to build Firefox, [http://webextensions-experiments.readthedocs.io/en/latest/index.html WebExtensions Experiments] is for you!
Developers in this group potentially have to update their add-on twice--once for e10s compatibility (if using [https://developer.mozilla.org/Add-ons/SDK/Low-Level_APIs low-level APIs]), and again for WebExtensions compatibility (because it uses legacy APIs).


#'''Use only [https://developer.mozilla.org/Add-ons/SDK/High-Level_APIs high-level APIs]''' - High-level APIs are [https://wiki.mozilla.org/Add-ons/developer/communication#1.29_Has_SDK_add-on_using_low_level_APIs e10s compatible] and are more likely to have an equivalent WebExtensions API. You will have to migrate again once WebExtensions are fully ready, but it should be pretty easy to do in this case.
*If you just want to request a WebExtensions API, please [https://bugzilla.mozilla.org/enter_bug.cgi?product=Toolkit&component=WebExtensions:%20Untriaged file a bug]. These will be triaged and processed in a [[Add-ons/Contribute/Triage|bi-weekly public meeting]].
#'''Move to [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions WebExtensions]''' - Check the [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK SDK/WebExtensions comparison chart] to see if the APIs you need are available, and see what else we're doing to [[Add-ons/developer/communication#Managing_the_Impact|mitigate the impact]] of this transition.


==3) Has SDK add-on using only high level APIs==
[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Embedded_WebExtensions Embedded WebExtensions] - In Firefox 51, you will be able to embed a WebExtensions add-on inside an existing SDK or bootstrapped add-on. This is especially useful to developers of SDK or bootstrapped add-ons who want to start migrating to WebExtensions and take advantage of new APIs like Native Messaging, but can’t fully migrate yet. It’s also useful for developers who want to complete data migration towards WebExtensions, and who want to take parts of their add-on that are not compatible with [https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox multiprocess Firefox] and make them compatible.
Developers who used the SDK for their add-ons using only [https://developer.mozilla.org/Add-ons/SDK/High-Level_APIs high-level APIs]. Might have played around with the Chrome extension API in the past.
=====Migration Path=====
We recommend you  start looking into [https://developer.mozilla.org/Add-ons/WebExtensions WebExtensions], which by the end of 2017 will be the only type of add-on supported. Check the [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK SDK/WebExtensions comparison chart] to see if the APIs you need are available, and see what else we're doing to [[Add-ons/developer/communication#Managing_the_Impact|mitigate the impact]] of this transition.  


==4) Has XUL or XPCOM add-on==
Not all add-ons will be able to migrate to WebExtensions without having to drop any features. But we want to work with you to get as many add-ons migrated as possible with the functionality you created intact. We invite you to contribute to its evolution, and we look forward to [[Add-ons/developer/communication#Get_in_Touch|working with you]].
Developers who created add-ons that don't rely on the SDK or WebExtensions.
=====Migration Path=====
The transition to WebExtensions impacts add-ons built on APIs like XUL and XPCOM most of all. We expect to remove support for these technologies in Firefox add-ons by the end of 2017. We hope this will give us enough time to help you migrate and provide WebExtension APIs that are suitable for replacing the features you might lose once we stop supporting these APIs.  


If you’ve already updated your add-on for multiprocess Firefox (e10s) compatibility, thank you for clearing this hurdle. If not, [https://developer.mozilla.org/en-US/Add-ons/Working_with_multiprocess_Firefox find out how].
=Tools=
*[https://compatibility-lookup.services.mozilla.com/ Lookup tool] to check your add-on type and get porting resource recommendations


To get started migrating to WebExtensions, check the [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions XUL/XPCOM-WebExtensions comparison chart] to see if the APIs you need are available. Additional resources can be found [[Add-ons/developer/communication#Managing_the_Impact|below]].
=Documentation=
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Porting_a_legacy_Firefox_add-on Porting guides that map SDK and XUL APIs to available WebExtensions APIs]
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions How-to guides] covering common add-on developer cases, like [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Intercept_HTTP_requests intercepting web requests] and [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Add_a_button_to_the_toolbar adding a button to the toolbar]
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK Comparison with the Add-on SDK]
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions Comparison with XUL/XPCOM extensions]
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs Browser compatibility table] for all WebExtensions APIs
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Examples Examples of WebExtensions]


For assistance, please join the [https://mail.mozilla.org/listinfo/dev-addons dev-addons@mozilla.org] mailing list and ask for help!
=Blog Posts=
 
*Nov 3, 2016: [https://blog.mozilla.org/addons/2016/11/03/more-ways-to-contribute-to-webextensions/ More ways to contribute to WebExtensions]
=Managing the Impact=
 
*Embedded WebExtensions - In Firefox 51, you can [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Embedded_WebExtensions embed] a WebExtensions add-on inside an existing SDK or bootstrapped add-on. This is especially useful to developers of SDK or bootstrapped add-ons who want to start migrating to WebExtensions and take advantage of new APIs like Native Messaging, but can’t fully migrate yet. It’s also useful for developers who want to complete data migration towards WebExtensions, and who want to take parts of their add-on that are not compatible with multiprocess Firefox and make them compatible.
 
*[http://webextensions-experiments.readthedocs.io/ WebExtension Experiments] - now it's easier to prototype WebExtension APIs, and you can do it without having to build Firefox.
 
*We're always adding new [https://developer.mozilla.org/en-US/Add-ons/WebExtensions WebExtensions documentation], so please check them out!
 
*Not all add-ons will be able to migrate to WebExtensions without having to drop any features. But we want to work with you to get as many add-ons migrated as possible with the functionality you created intact. We invite you to contribute to its evolution, and we look forward to [https://wiki.mozilla.org/Add-ons/developer/communication#Get_in_Touch working with you].
 
=Add-on Developer Communication Calendar=
This calendar includes public meetings, scheduled blog posts, office hours, release milestones that affect add-on developers, and more. Links to add it to your own calendar: [https://calendar.google.com/calendar/ical/mozilla.com_ofjlct07k1784v1u51bqk476bk%40group.calendar.google.com/public/basic.ics iCal] | [https://calendar.google.com/calendar/embed?src=mozilla.com_ofjlct07k1784v1u51bqk476bk%40group.calendar.google.com&ctz=America/Los_Angeles HTML]
 
{{#widget:Widget:Google Calendar
|id=bW96aWxsYS5jb21fb2ZqbGN0MDdrMTc4NHYxdTUxYnFrNDc2YmtAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ
}}
 
=Blog Posts and Other Resources=
 
==WebExtensions==
=====Blog Posts=====
*Sep 29, 2016: [https://blog.mozilla.org/addons/2016/09/29/webextensions-in-firefox-51/ WebExtensions in Firefox 51]
*Sep 29, 2016: [https://blog.mozilla.org/addons/2016/09/29/webextensions-in-firefox-51/ WebExtensions in Firefox 51]
*Sep 28, 2016: [https://blog.mozilla.org/addons/2016/09/28/migrating-an-sdk-add-on-to-multiprocess-firefox/ How Video DownloadHelper Became Compatible with Multiprocess Firefox]
*Sep 13, 2016: [https://blog.mozilla.org/addons/2016/09/13/webextensions-and-parity-with-chrome/ WebExtensions and parity with Chrome]
*Sep 13, 2016: [https://blog.mozilla.org/addons/2016/09/13/webextensions-and-parity-with-chrome/ WebExtensions and parity with Chrome]
*Aug 25, 2016: [https://blog.mozilla.org/addons/2016/08/25/webextensions-in-firefox-50/ WebExtensions in Firefox 50]
*Aug 25, 2016: [https://blog.mozilla.org/addons/2016/08/25/webextensions-in-firefox-50/ WebExtensions in Firefox 50]
Line 91: Line 57:
*May 9, 2016: [https://blog.mozilla.org/addons/2016/05/09/results-of-the-webextensions-api-survey/ Results of the WebExtensions API Survey]
*May 9, 2016: [https://blog.mozilla.org/addons/2016/05/09/results-of-the-webextensions-api-survey/ Results of the WebExtensions API Survey]
*Apr 29, 2016: [https://blog.mozilla.org/addons/2016/04/29/webextensions-in-firefox-48/ WebExtensions in Firefox 48]
*Apr 29, 2016: [https://blog.mozilla.org/addons/2016/04/29/webextensions-in-firefox-48/ WebExtensions in Firefox 48]
*Apr 26, 2016: [https://blog.mozilla.org/addons/2016/04/26/migrating-popup-alt-attribute-from-xulxpcom-to-webextensions/ Migrating Popup ALT Attribute from XUL/XPCOM to WebExtensions]
*Apr 14, 2016: [https://blog.mozilla.org/addons/2016/04/14/developing-extensions-with-web-ext-1-0/ Developing Extensions With Web-ext 1.0]
*Apr 14, 2016: [https://blog.mozilla.org/addons/2016/04/14/developing-extensions-with-web-ext-1-0/ Developing Extensions With Web-ext 1.0]
*Mar 30, 2016: [https://blog.mozilla.org/addons/2016/03/30/tinkering-with-webextensions/ Tinkering with WebExtensions]
*Mar 30, 2016: [https://blog.mozilla.org/addons/2016/03/30/tinkering-with-webextensions/ Tinkering with WebExtensions]
Line 100: Line 67:
*Aug 21, 2015: [https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/ The Future of Developing Firefox Add-ons]
*Aug 21, 2015: [https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/ The Future of Developing Firefox Add-ons]


=====Other Resources=====
=Add-on Developer Communication Calendar=
*[https://compatibility-lookup.services.mozilla.com/ Compatibility Lookup Tool]
This calendar includes public meetings, scheduled blog posts, office hours, release milestones that affect add-on developers, and more. Links to add it to your own calendar: [https://calendar.google.com/calendar/ical/mozilla.com_ofjlct07k1784v1u51bqk476bk%40group.calendar.google.com/public/basic.ics iCal] | [https://calendar.google.com/calendar/embed?src=mozilla.com_ofjlct07k1784v1u51bqk476bk%40group.calendar.google.com&ctz=America/Los_Angeles HTML]
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Embedded_WebExtensions Embedded WebExtensions] let you [https://blog.mozilla.org/addons/2016/09/29/webextensions-in-firefox-51/ embed] a WebExtensions add-on inside an existing SDK or bootstrapped add-on
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK Comparison with the Add-on SDK]
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions Comparison with XUL/XPCOM extensions]
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions How-to guides] covering common add-on developer cases, like [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Intercept_HTTP_requests intercepting web requests] and [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Add_a_button_to_the_toolbar adding a button to the toolbar]
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs Browser compatibility table] for all WebExtensions APIs
*[https://github.com/mdn/webextensions-examples Example add-ons] created with WebExtensions APIs


==Multiprocess (e10s) Firefox==
{{#widget:Widget:Google Calendar
=====Blog Posts=====
|id=bW96aWxsYS5jb21fb2ZqbGN0MDdrMTc4NHYxdTUxYnFrNDc2YmtAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ
*Sep 7, 2016: [https://blog.mozilla.org/addons/2016/09/07/help-make-add-ons-multiprocess-compatible-with-add-on-compatibility-reporter/ Help make add-ons multiprocess compatible with Add-on Compatibility Reporter]
}}
*Aug 2, 2016: [https://blog.mozilla.org/addons/2016/08/02/multi-process-firefox-and-add-ons-a-call-to-action/ Multi-process Firefox and Add-ons: A Call to Action for Extension Developers]
*June 17, 2016: [https://blog.mozilla.org/addons/2016/06/17/multi-process-firefox-and-amo/ Multi-process Firefox and AMO]
*Apr 11, 2016: [https://blog.mozilla.org/addons/2016/04/11/the-why-of-electrolysis/ The “Why” of Electrolysis]
*Nov 23, 2015: [https://blog.mozilla.org/addons/2015/11/23/test-your-add-ons-for-multi-process-firefox-compatibility/ Test your add-ons for Multi-process Firefox compatibility]
=====Other Resources=====
*[https://developer.mozilla.org/en-US/Add-ons/Working_with_multiprocess_Firefox Working with multiprocess Firefox]
 
==Migrating from XUL/XPCOM==
=====Blog Posts=====
*Sep 28, 2016: [https://blog.mozilla.org/addons/2016/09/28/migrating-an-sdk-add-on-to-multiprocess-firefox/ How Video DownloadHelper Became Compatible with Multiprocess Firefox]
*Apr 26, 2016: [https://blog.mozilla.org/addons/2016/04/26/migrating-popup-alt-attribute-from-xulxpcom-to-webextensions/ Migrating Popup ALT Attribute from XUL/XPCOM to WebExtensions]
=====Other Resources=====
*[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions Comparison with XUL/XPCOM extensions]


=Get in Touch=
=Get in Touch=

Revision as of 22:11, 21 November 2016

Evolution in Add-on Development

WebExtensions are becoming the standard for add-on development in Firefox. It will be the only type of add-on supported in Firefox by the end of 2017.

This page contains timelines, tutorials, and other resources to help you port your add-on to WebExtensions. If you're looking for resources on creating a new add-on, please head over to MDN.

What's New

Timelines & Roadmaps

Migration paths for developers of legacy add-ons

1) SDK add-on

Here is the comparison chart showing SDK APIs and their WebExtensions counterparts. If you don't see the APIs you need to port to WebExtensions, please take a look at some more options below.

2) XUL or XPCOM add-on

Here is the comparison chart showing XUL/XPCOM APIs and their WebExtensions counterparts. If you don't see the APIs you need to port to WebExtensions, please take a look at some more options below.

Don't See the WebExtensions APIs You Need?

  • If you're experienced with Mozilla infrastructure and would like to develop WebExtensions APIs directly for Firefox, here is a list of approved APIs that you can start contributing to.
  • If you want to prototype and tinker with WebExtensions APIs without having to build Firefox, WebExtensions Experiments is for you!

Embedded WebExtensions - In Firefox 51, you will be able to embed a WebExtensions add-on inside an existing SDK or bootstrapped add-on. This is especially useful to developers of SDK or bootstrapped add-ons who want to start migrating to WebExtensions and take advantage of new APIs like Native Messaging, but can’t fully migrate yet. It’s also useful for developers who want to complete data migration towards WebExtensions, and who want to take parts of their add-on that are not compatible with multiprocess Firefox and make them compatible.

Not all add-ons will be able to migrate to WebExtensions without having to drop any features. But we want to work with you to get as many add-ons migrated as possible with the functionality you created intact. We invite you to contribute to its evolution, and we look forward to working with you.

Tools

  • Lookup tool to check your add-on type and get porting resource recommendations

Documentation

Blog Posts

Add-on Developer Communication Calendar

This calendar includes public meetings, scheduled blog posts, office hours, release milestones that affect add-on developers, and more. Links to add it to your own calendar: iCal | HTML

Error in widget Widget:Google Calendar: Unable to load template 'wiki:Widget:Google Calendar'

Get in Touch

  • IRC:
    • #teamaddons: team chat
    • #addons: support for extensions, themes, plugins and addons.mozilla.org
    • #amo: addons.mozilla.org bugs and development
    • #amo-editors: add-on reviews and policy
    • #extdev: extension development
    • #themedev: theme development
    • #webextensions: web extensions