{"id":7942,"date":"2016-09-29T07:43:52","date_gmt":"2016-09-29T14:43:52","guid":{"rendered":"http:\/\/blog.mozilla.org\/addons\/?p=7942"},"modified":"2016-09-30T13:26:26","modified_gmt":"2016-09-30T20:26:26","slug":"webextensions-in-firefox-51","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/","title":{"rendered":"WebExtensions in Firefox 51"},"content":{"rendered":"<p><a href=\"https:\/\/wiki.mozilla.org\/RapidRelease\/Calendar#Future_branch_dates\">Firefox 51<\/a> landed in Developer Edition this week, so we have another update on<a href=\"https:\/\/wiki.mozilla.org\/WebExtensions\"> WebExtensions<\/a> for you. In this update, we\u2019re making it easier for you to <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Porting_a_legacy_Firefox_add-on\">port<\/a> your existing add-ons to WebExtensions. In addition to being fully compatible with <a href=\"https:\/\/developer.mozilla.org\/en-US\/Firefox\/Multiprocess_Firefox\">multiprocess Firefox<\/a>, WebExtensions are becoming the standard for add-on development.<\/p>\n<h2>Embedded WebExtensions<\/h2>\n<p>In Firefox Developer Edition, you can now <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Embedded_WebExtensions\" target=\"_blank\">embed<\/a> a WebExtensions add-on inside an existing SDK or bootstrapped add-on.<\/p>\n<p>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 <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Native_messaging\">Native Messaging<\/a>, but can\u2019t fully migrate yet. It\u2019s 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.<\/p>\n<p>For more documentation on this, please head over to <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Embedded_WebExtensions\">MDN<\/a> or check out some <a href=\"https:\/\/github.com\/rpl\/webextensions-examples\/tree\/examples\/hybrid-addons-native-messaging\/embedded-webextension-native-messaging\">examples<\/a>.<\/p>\n<p>If you need help porting to WebExtensions, please start with the <a href=\"http:\/\/compatibility-lookup.services.mozilla.com\/\">compatibility checker<\/a>, and check out these <a href=\"https:\/\/wiki.mozilla.org\/Add-ons\/developer\/communication\">resources<\/a>.<\/p>\n<h2>Manifest Change<\/h2>\n<p>Because of confusion around the use of <code>strict_min_version<\/code> in WebExtensions manifests, we\u2019ve <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1298923\">prevented the use of * in <code>strict_min_version<\/code><\/a>, for example <code>48.*<\/code> is no longer valid. If you upload an add-on to addons.mozilla.org we\u2019ll warn you of that fact.<\/p>\n<h2>API Changes<\/h2>\n<p>The <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1197451\"><code>clipboardWrite<\/code> permission<\/a> is now enabled which removes the need to be in a user gesture. This is usable from extension tabs, popups and content scripts.<\/p>\n<p>When a WebExtensions add-on is uninstalled, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1213990\">any local storage is now cleared<\/a>. If you\u2019d like to persist data across an uninstall then you can use <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1220494\">the upcoming sync storage<\/a>.<\/p>\n<p>The <code>management<\/code> API now supports the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1220136\"><code>uninstallSelf<\/code><\/a> and <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1283116\"><code>getSelf<\/code><\/a> methods. The <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/API\/idle\/queryState\"><code>idle.queryState<\/code><\/a> API has been updated to accurately reflect the state, previously it always returned the value \u201cidle\u201d.<\/p>\n<p>In the <code>webRequest<\/code> API, <code>onBeforeRequest<\/code> is now supported in Firefox Nightly and Developer Edition. There are some <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1201979#c35\">platform changes<\/a> that are required to get that to land in a Release version of Firefox.<\/p>\n<p>Developers have been testing out Native messaging and a couple of bugs were filed and fixed on that. New, more detailed, <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Native_messaging\">documentation has been written<\/a>. One of the useful pieces of feedback involved the performance of the round-trip time, and that has now<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1288912\"> improved<\/a>.<\/p>\n<p>There has been a few improvements to the appearance of popup windows including the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1293099\">popup arrow<\/a>, the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1280128\">corners of the popup<\/a> and reducing <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1259093\">flicker on the animation<\/a>. Here\u2019s a before and after:<\/p>\n<p><a href=\"https:\/\/blog.mozilla.org\/addons\/files\/2016\/09\/popup-before.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7944\" src=\"https:\/\/blog.mozilla.org\/addons\/files\/2016\/09\/popup-before.png\" alt=\"popup-before\" width=\"102\" height=\"177\" \/><\/a><\/p>\n<p><a href=\"https:\/\/blog.mozilla.org\/addons\/files\/2016\/09\/popup-after.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7943\" src=\"https:\/\/blog.mozilla.org\/addons\/files\/2016\/09\/popup-after.png\" alt=\"popup-after\" width=\"102\" height=\"177\" \/><\/a><\/p>\n<h2>Out of process extensions<\/h2>\n<p>Now that the majority of the work multi process Firefox has been completed, we are looking ahead to the many improvements it can bring. One of them is allowing WebExtensions to be run in a separate process. This process-sandboxing of add-ons will bring clear performance and security benefits.<\/p>\n<p>But before we can do that, there is quite a bit of work that needs to be done. The <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1190679\">main tracking bug<\/a> lists some of these tasks. There is also a <a href=\"https:\/\/air.mozilla.org\/intern-presentations-2016\/#@1h48m6s\">video of Rob Wu<\/a> presenting the work he has done on this. There currently isn\u2019t a timeline for when this will be landed, but the work is progressing.<\/p>\n<h2>Recognition<\/h2>\n<p>We\u2019d also like to give a thank you to four new contributors to WebExtensions, who\u2019ve helped with this release. Thanks to <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=jshubheksha%40gmail.com\">sj<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=jorgk%40jorgk.com\">Jorg K<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=fiveNinePlusR%40gmail.com\">fiveNinePlusR<\/a> and <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=tomica%40gmail.com\">Tomislav<\/a>.<\/p>\n<p><b>Update:<\/b> link to Robs presentation fixed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firefox 51 landed in Developer Edition this week, so we have another update on WebExtensions for you. In this update, we\u2019re making it easier for you to port your existing &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/\">Read more<\/a><\/p>\n","protected":false},"author":271,"featured_media":7600,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[388,44,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 51 - 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\/09\/29\/webextensions-in-firefox-51\/\" \/>\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\/09\/29\/webextensions-in-firefox-51\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/\",\"name\":\"WebExtensions in Firefox 51 - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2015\/11\/firefox_logo-only_RGB.png\",\"datePublished\":\"2016-09-29T14:43:52+00:00\",\"dateModified\":\"2016-09-30T20:26:26+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/#primaryimage\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/files\/2015\/11\/firefox_logo-only_RGB.png\",\"contentUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2015\/11\/firefox_logo-only_RGB.png\",\"width\":2982,\"height\":2808},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WebExtensions in Firefox 51\"}]},{\"@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 51 - 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\/09\/29\/webextensions-in-firefox-51\/","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\/09\/29\/webextensions-in-firefox-51\/","url":"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/","name":"WebExtensions in Firefox 51 - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/#primaryimage"},"image":{"@id":"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2015\/11\/firefox_logo-only_RGB.png","datePublished":"2016-09-29T14:43:52+00:00","dateModified":"2016-09-30T20:26:26+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/#primaryimage","url":"https:\/\/blog.mozilla.org\/addons\/files\/2015\/11\/firefox_logo-only_RGB.png","contentUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2015\/11\/firefox_logo-only_RGB.png","width":2982,"height":2808},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2016\/09\/29\/webextensions-in-firefox-51\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"WebExtensions in Firefox 51"}]},{"@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\/7942"}],"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=7942"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/7942\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media\/7600"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=7942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=7942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=7942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}