{"id":7728,"date":"2016-03-11T10:00:36","date_gmt":"2016-03-11T18:00:36","guid":{"rendered":"http:\/\/blog.mozilla.org\/addons\/?p=7728"},"modified":"2016-05-09T10:18:13","modified_gmt":"2016-05-09T17:18:13","slug":"webextensions-in-firefox-47","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/","title":{"rendered":"WebExtensions in Firefox 47"},"content":{"rendered":"<p>We last<a href=\"https:\/\/blog.mozilla.org\/addons\/2016\/02\/02\/webextensions-in-firefox-46\/\" target=\"_blank\"> updated<\/a> you on our progress with<a href=\"https:\/\/wiki.mozilla.org\/WebExtensions\" target=\"_blank\"> WebExtensions<\/a> when Firefox 46 landed in Developer Edition (Aurora), and today we have an update for <a href=\"https:\/\/wiki.mozilla.org\/RapidRelease\/Calendar#Future_branch_dates\" target=\"_blank\">Firefox 47<\/a>, which landed in Developer Edition last week.<\/p>\n<p>While WebExtensions will remain in a <b>beta state<\/b> in Firefox 47, we\u2019ve made lots of progress, with <a href=\"https:\/\/bugzilla.mozilla.org\/buglist.cgi?list_id=12894634&amp;resolution=FIXED&amp;chfieldto=2016-03-06&amp;query_format=advanced&amp;chfield=cf_last_resolved&amp;chfieldfrom=2016-01-27&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED&amp;component=WebExtensions&amp;product=Toolkit\" target=\"_blank\">81 bugs closed<\/a> since the last update. As of this update, we are still on track for a milestone release in Firefox 48 when it hits Developer Edition.<\/p>\n<p>There\u2019s a new way for you to get involved! Tell us which APIs you\u2019d like support for by filling out <a href=\"http:\/\/bit.ly\/webextensions-apis\" target=\"_blank\">this survey<\/a>, to help us better prioritize them. We have also created a <a href=\"https:\/\/wiki.mozilla.org\/Add-ons\/developer\/communication\" target=\"_blank\">wiki page<\/a> filled with resources to support developers through all the changes coming in the add-ons world.<\/p>\n<h2>APIs Implemented<\/h2>\n<p>Adding keyboard shortcuts that trigger actions in your extension arrived with the partial implementation of <em><a href=\"https:\/\/developer.chrome.com\/extensions\/commands\" target=\"_blank\">commands<\/a><\/em>. This allows developers to map key presses from the manifest to actions in your add-on.<\/p>\n<p>With the partial implementation of <em><a href=\"https:\/\/developer.chrome.com\/extensions\/downloads\">downloads<\/a><\/em> you can download files from your add-on and get updates of the download progress. You can also search through the existing downloads using the search API.<\/p>\n<p>Several additions and changes in <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/webRequest\" target=\"_blank\">webRequest<\/a><\/em> have been included in Firefox 47. These prelude even bigger news for add-ons that focus on security and privacy to work perform the sort of network inspection needed to do their job. More details on these changes are covered in <a href=\"https:\/\/hackademix.net\/2016\/03\/09\/webrequest-where-were-where-were-going\/\" target=\"_blank\">Giorgio\u2019s blog post<\/a>.<\/p>\n<p>Also completed is the <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/i18n\" target=\"_blank\">i18n<\/a><\/em> API and we are getting closer to completing the <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/bookmarks\" target=\"_blank\">bookmarks<\/a><\/em> API.<\/p>\n<p>More of the <em><a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/API\/tabs\">tabs<\/a><\/em> API have been completed, including:<\/p>\n<ul>\n<li>The methods: <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/Tabs\/executeScript\" target=\"_blank\">executeScript<\/a><\/em>, <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/Tabs\/insertCSS\" target=\"_blank\">insertCSS<\/a><\/em>, <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/Tabs\/detectLanguage\" target=\"_blank\">detectLanguage<\/a><\/em> and <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/Tabs\/captureVisibleTab\" target=\"_blank\">captureVisibleTab<\/a><\/em>.<\/li>\n<li>The events: <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/Tabs\/onAttached\" target=\"_blank\">onAttached<\/a><\/em>, <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/Tabs\/onDetached\" target=\"_blank\">onDetached<\/a><\/em>, <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/Tabs\/onMoved\" target=\"_blank\">onMoved<\/a><\/em> and <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/Tabs\/onHighlighted\" target=\"_blank\">onHighlighted<\/a><\/em>.<\/li>\n<li>The attributes: <em>muted<\/em> and <em>audible<\/em><\/li>\n<\/ul>\n<p>Several improvements have been made to the <em><a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/windows\" target=\"_blank\">windows<\/a><\/em> API, including :<\/p>\n<ul>\n<li>Added support for <a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/Windows\/create\" target=\"_blank\">creating<\/a> a new window from an existing tab, popup-type windows<\/li>\n<li>Querying and changing a windows\u2019 minimized, maximized and fullscreen <a href=\"https:\/\/developer.mozilla.org\/Add-ons\/WebExtensions\/API\/Windows\/WindowState\" target=\"_blank\">state<\/a>.<\/li>\n<\/ul>\n<p>All asynchronous methods which accept a callback function will now return a Promise if no callback is passed. These promises resolve at the same time a callback would normally be called, and reject with the value of <em>lastError<\/em> in cases where that would otherwise be set. Additionally, <em>onMessage<\/em> listeners may now return a Promise object if they wish to send a reply. When the promise resolves, its resolution value will be returned to the sender.<\/p>\n<p>WebExtension manifests now support a &#8220;<em>creator<\/em>&#8221; property, which is displayed in the Add-on Manager, to indicate the author of the add-on. Additionally, manifests are now fully type-checked at startup, and any type errors or unexpected properties are reported to the Browser Console for inspection.<\/p>\n<p>For the full list of API changes, please see <a href=\"https:\/\/bugzilla.mozilla.org\/buglist.cgi?list_id=12894634&amp;resolution=FIXED&amp;chfieldto=2016-03-06&amp;query_format=advanced&amp;chfield=cf_last_resolved&amp;chfieldfrom=2016-01-27&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED&amp;component=WebExtensions&amp;product=Toolkit\" target=\"_blank\">the bug list<\/a>.<\/p>\n<h2>Command line tool<\/h2>\n<p>A new command line tool is being build for WebExtensions, called \u201cweb-ext\u201d will allow you to run, test and sign add-ons easily from the command line. For example to run your add-on in a new profile, from your add-on, just call: <em>web-ext run<\/em>.<\/p>\n<p>This command line utility is in its early days, but you can follow along with <a href=\"https:\/\/github.com\/mozilla\/web-ext\" target=\"_blank\">web-ext development on github<\/a>.<\/p>\n<h2>New examples<\/h2>\n<p>We\u2019ve been preparing <a href=\"https:\/\/github.com\/mdn\/webextensions-examples\" target=\"_blank\">examples of our APIs on github<\/a>. In the last few weeks we\u2019ve added two more examples:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/mdn\/webextensions-examples\/tree\/master\/bookmark-it\" target=\"_blank\">bookmark-it<\/a>: an add-on that toggles a bookmark for the currently active tab.<\/li>\n<li><a href=\"https:\/\/github.com\/mdn\/webextensions-examples\/tree\/master\/tabs-tabs-tabs\" target=\"_blank\">tabs-tabs-tabs<\/a>: an add-on that demonstrates some of the tabs APIs available (currently move, duplicate, reload and remove)<\/li>\n<\/ul>\n<p>There are currently ten example add-ons available in the repository. All of them can be installed easily by cloning the repository locally and then <a href=\"https:\/\/blog.mozilla.org\/addons\/2015\/12\/23\/loading-temporary-add-ons\/\" target=\"_blank\">installing temporarily through about:debugging<\/a>.<br \/>\nOver the coming months we will work our way towards a beta in<a href=\"https:\/\/wiki.mozilla.org\/RapidRelease\/Calendar#Future_branch_dates\" target=\"_blank\"> Firefox 47<\/a> and the first stable release in<a href=\"https:\/\/wiki.mozilla.org\/RapidRelease\/Calendar#Future_branch_dates\" target=\"_blank\"> Firefox 48<\/a>. If you\u2019d like to jump in to help, or get your API added, please join us on our<a href=\"https:\/\/mail.mozilla.org\/listinfo\/dev-addons\" target=\"_blank\"> mailing list<\/a> or at one of our <a href=\"https:\/\/wiki.mozilla.org\/WebExtensions#Communication_and_meetings\" target=\"_blank\">public meetings<\/a>. You can also check out <a href=\"https:\/\/wiki.mozilla.org\/Add-ons\/Contribute#Improve_add-ons_in_Firefox\" target=\"_blank\">this wiki<\/a> to see more ways to participate in the evolution of WebExtensions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We last updated you on our progress with WebExtensions when Firefox 46 landed in Developer Edition (Aurora), and today we have an update for Firefox 47, which landed in Developer &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/\">Read more<\/a><\/p>\n","protected":false},"author":271,"featured_media":1995,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,121,278886],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WebExtensions in Firefox 47 - Mozilla Add-ons Community Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andy McKay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/\",\"name\":\"WebExtensions in Firefox 47 - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2010\/10\/addons.png\",\"datePublished\":\"2016-03-11T18:00:36+00:00\",\"dateModified\":\"2016-05-09T17:18:13+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/#primaryimage\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/files\/2010\/10\/addons.png\",\"contentUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2010\/10\/addons.png\",\"width\":\"217\",\"height\":\"188\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WebExtensions in Firefox 47\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/\",\"name\":\"Mozilla Add-ons Community Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8\",\"name\":\"Andy McKay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ad304e7a7d4f6fba05a81b10810fe6fd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ad304e7a7d4f6fba05a81b10810fe6fd?s=96&d=mm&r=g\",\"caption\":\"Andy McKay\"},\"description\":\"Andy is an Engineering Manager at Mozilla. As a Canadian he tweets and blogs about curling, skiing, politics, maple syrup, bears and all things from the great white north.\",\"sameAs\":[\"http:\/\/mckay.pub\",\"https:\/\/x.com\/andymckay\"],\"url\":\"https:\/\/blog.mozilla.org\/addons\/author\/amckaymozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WebExtensions in Firefox 47 - Mozilla Add-ons Community Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/","twitter_misc":{"Written by":"Andy McKay","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/","url":"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/","name":"WebExtensions in Firefox 47 - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/#primaryimage"},"image":{"@id":"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2010\/10\/addons.png","datePublished":"2016-03-11T18:00:36+00:00","dateModified":"2016-05-09T17:18:13+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/#primaryimage","url":"https:\/\/blog.mozilla.org\/addons\/files\/2010\/10\/addons.png","contentUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2010\/10\/addons.png","width":"217","height":"188"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2016\/03\/11\/webextensions-in-firefox-47\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"WebExtensions in Firefox 47"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/addons\/#website","url":"https:\/\/blog.mozilla.org\/addons\/","name":"Mozilla Add-ons Community Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8","name":"Andy McKay","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ad304e7a7d4f6fba05a81b10810fe6fd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ad304e7a7d4f6fba05a81b10810fe6fd?s=96&d=mm&r=g","caption":"Andy McKay"},"description":"Andy is an Engineering Manager at Mozilla. As a Canadian he tweets and blogs about curling, skiing, politics, maple syrup, bears and all things from the great white north.","sameAs":["http:\/\/mckay.pub","https:\/\/x.com\/andymckay"],"url":"https:\/\/blog.mozilla.org\/addons\/author\/amckaymozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/7728"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/users\/271"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/comments?post=7728"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/7728\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media\/1995"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=7728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=7728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=7728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}