{"id":8262,"date":"2017-09-28T13:32:31","date_gmt":"2017-09-28T20:32:31","guid":{"rendered":"http:\/\/blog.mozilla.org\/addons\/?p=8262"},"modified":"2018-09-03T12:44:54","modified_gmt":"2018-09-03T19:44:54","slug":"webextensions-in-firefox-57","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/","title":{"rendered":"WebExtensions in Firefox 57"},"content":{"rendered":"<p><a href=\"https:\/\/wiki.mozilla.org\/RapidRelease\/Calendar#Future_branch_dates\">Firefox 57<\/a> has reached Beta, and a bevy of new APIs and improvements have landed that will put us in a good place for the Firefox Quantum launch in November.<\/p>\n<p>Legacy add-ons no longer load in Firefox 57, but there is still <a href=\"https:\/\/blog.mozilla.org\/addons\/2017\/09\/08\/last-chance-migrate-user-data\/\">time to migrate<\/a> (<a href=\"https:\/\/addons.mozilla.org\/firefox\/search\/?tag=firefox57&amp;utm_source=blog.mozilla.org&amp;utm_medium=post&amp;utm_campaign=2017-09-webext\">almost 5,000<\/a> have migrated so far!), and you can do so even after it lands in release. Just update your listing with the new code and your users will automatically update to the compatible version. When you do, be sure to <a href=\"https:\/\/blog.mozilla.org\/addons\/2017\/09\/07\/tell-users-expect-webextensions-version\/\">tell them<\/a> about it.<\/p>\n<p>Documentation for the APIs discussed here can be <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\">found on MDN Web Docs<\/a>.<\/p>\n<h2>API changes<\/h2>\n<h3>Tabs and Sessions APIs<\/h3>\n<p>Tabs now have a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1377733\">discarded state<\/a> added to the <code>Tab<\/code> object. It will be set to <code>true<\/code> if the tab is not loaded with content, for example when restored from a previous session. This is part of getting ready for a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1322485\"><code>tabs.discard<\/code><\/a> API.<\/p>\n<p>The <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1238314\"><code>tabs.opener<\/code><\/a> API has now been implemented which means that <code>openerTabId<\/code> is available to the update and create methods and on the <code>Tab<\/code> object. This allows extensions to track the opener of tabs.<\/p>\n<p>Also, the tabs API can now open URLs that are <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1261289#28\"><code>view-source:<\/code><\/a> links and do a \u201c<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1397383\">load replace<\/a>\u201d which changes the page and replaces the current history so that the back button is unaffected.<\/p>\n<p>The session API now has some APIs for <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1322060\">setting, getting and removing data<\/a> on a per tab or per window basis. This allows information about tabs or windows to survive session restores without the data needing to be stored by individual extensions.<\/p>\n<h3>webRequest API<\/h3>\n<p>The <code>webRequest<\/code> details object now includes <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1373646\">proxy information<\/a>. This proxy information will let <code>webRequest<\/code> listeners determine how the request interacted with a proxy.<\/p>\n<p>A major new API for <code>webRequest<\/code> is now available which allows an extension to filter the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1255894\">HTTP response bodies<\/a> as they come in. The code below alters the text on <a href=\"https:\/\/example.com\">example.com<\/a>. You could do this through a content script, but being able to alter the HTTP response body gives a whole new set of possibilities:<\/p>\n<pre>function listener(details) {\r\n let filter = browser.webRequest.filterResponseData(details.requestId);\r\n let decoder = new TextDecoder(\"utf-8\");\r\n let encoder = new TextEncoder();\r\n\r\n filter.ondata = event =&gt; {\r\n    let str = decoder.decode(event.data, {stream: true});\r\n    str = str.replace(\/Example\/g, 'WebExtension Example');\r\n    filter.write(encoder.encode(str));\r\n    filter.disconnect();\r\n }\r\n\r\n return {};\r\n}\r\n\r\nbrowser.webRequest.onBeforeRequest.addListener(\r\n listener,\r\n {urls: [\"https:\/\/example.com\/*\"], types: [\"main_frame\"]},\r\n [\"blocking\"]\r\n);<\/pre>\n<h3>Storage API<\/h3>\n<p>A <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1386427\">basic implementation of <code>chrome.storage.managed<\/code><\/a> has landed. This allows administrators or other applications to configure extensions for users. In Firefox you can place a JSON file in a directory, just like for <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Native_messaging\">native messaging<\/a>. For example, a file called <a href=\"favourite-colour-examples@mozilla.org\"><code>favourite-colour-examples@mozilla.org.json<\/code><\/a> could be placed in the appropriate place:<\/p>\n<pre>{\r\n \"name\": \"favourite-colour-examples@mozilla.org\",\r\n \"description\": \"ignored\",\r\n \"type\": \"storage\",\r\n \"data\": {\r\n    \"colour\": \"blue!\"\r\n }\r\n}<\/pre>\n<p>Then in the <a href=\"https:\/\/github.com\/mdn\/webextensions-examples\/tree\/master\/favourite-colour\">favourite-colour-examples@mozilla.org<\/a> extension:<\/p>\n<pre> browser.storage.managed.get('colour').then((colour) =&gt; {\r\n   console.log(colour);\r\n });<\/pre>\n<p>Would output \u201cblue!\u201d.<\/p>\n<h3>Clipboard API<\/h3>\n<p>A new clipboard API has been added to allow the copying of images to the clipboard. The <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1356543\"><code>clipboard.setImageData<\/code><\/a> allows you to populate the clipboard with image data. This API is compatible with the <a href=\"https:\/\/developer.chrome.com\/apps\/clipboard\">Chrome apps API<\/a>, but at this point it should be considered experimental. This API requires the <code>clipboardWrite<\/code> permission.<\/p>\n<h3>Developer Tools API<\/h3>\n<p>The developer tools gained the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1341305\"><code>panels.elements.createSidebarPane<\/code><\/a> API and a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1398729\"><code>panels.elements sidebar.setExpression<\/code><\/a> method. This lets extensions create sidebars in the developer tools. Here\u2019s an example extension that parses jQuery variables:<\/p>\n<p><a href=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-8263\" src=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1.png\" alt=\"\" width=\"1729\" height=\"266\" srcset=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1.png 1729w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1-252x39.png 252w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1-768x118.png 768w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1-600x92.png 600w\" sizes=\"(max-width: 1729px) 100vw, 1729px\" \/><\/a><\/p>\n<h3>Find API<\/h3>\n<p>A <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1332144\"><code>find<\/code><\/a> API has landed in Firefox. This allows extensions to call the Firefox find API on a tab and get information about the results. It can then add or remove syntax highlighting from that tab, based on the previous search.<\/p>\n<p>This example extension uses the API to search across multiple tabs and highlights them:<\/p>\n<p><a href=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-8264\" src=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image2.png\" alt=\"\" width=\"1566\" height=\"798\" srcset=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image2.png 1566w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image2-252x128.png 252w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image2-768x391.png 768w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image2-600x306.png 600w\" sizes=\"(max-width: 1566px) 100vw, 1566px\" \/><\/a><\/p>\n<h3>Miscellaneous changes<\/h3>\n<ul>\n<li>Content scripts that that are at the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1395287\"><code>document_end<\/code> can no longer run<\/a> before the scripts that run at <code>document_start<\/code>. A bug where some pages using <code>document.write<\/code> conflicted with content scripts <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1379148\">has been resolved<\/a>.<\/li>\n<li>Some search engine configuration support has been added. Extensions can now set the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1378882\">default search engine<\/a> to one of the built in choices for search engines through <code>chrome_settings_overrides<\/code> in the manifest. This will not require a prompt. If a search engine that is not shipped with Firefox is requested as default, the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1397975\">user will be prompted<\/a> to accept the new default. Extensions can now also set a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1390153\"><code>suggest_url<\/code><\/a> for a search engine.<\/li>\n<li>The privacy API has some additions:\n<ul>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1345158\"><code>trackingProtection<\/code><\/a> lets extensions to toggle tracking protection for normal and private browsing mode.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1339550\"><code>allowPopupsForUserEvents<\/code><\/a> lets extensions change if popups are allowed.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1364972\"><code>imageAnimationBehavior<\/code><\/a> lets extensions control how images are animated in the browser.<\/li>\n<\/ul>\n<\/li>\n<li>Other APIs that have changed include:\n<ul>\n<li>Download API now supports <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1392003\"><code>estimatedEndTime<\/code><\/a> in the <code>DownloadItem<\/code> object.<\/li>\n<li>Bookmarks now have <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1293853\">separator support<\/a>.<\/li>\n<li>BrowsingData API now <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1355576\">allows you to clear <code>localStorage<\/code><\/a>.<\/li>\n<\/ul>\n<\/li>\n<li>Extensions can now open the <code>browserAction<\/code>, the <code>pageAction<\/code> and the open or close the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1341126\">sidebar programmatically<\/a>. However, this can only be done when some user interaction, such as clicking a link or button, has been done in the browser.<\/li>\n<li>Container support has improved by no longer requiring a user to flip a preference. If a user installs an extension that uses <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/API\/contextualIdentities\"><code>contextualIdentities<\/code><\/a> then it is <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1354602\">automatically flipped on<\/a>. This will show up in the users about:preferences (see later). There are <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1344519\">now events that allow extensions<\/a> to find out when containers change.<\/li>\n<li>The theming API has added a few more properties which allow the theming of: the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1389465\">URL bar and search input<\/a> and the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1387582\">text<\/a> and <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1347182\">background colour<\/a> of the toolbar. Further, the dynamic <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/API\/theme\">theme.update<\/a> API can now be applied to a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1342712\">specific window<\/a>.<\/li>\n<li>Finally, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1394134\">permissions<\/a> have been added to the installation prompt for the following APIs: <code>browsingData<\/code>, <code>downloads.open<\/code>, <code>proxy<\/code> and also <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1394553\"><code>devtools_page<\/code><\/a>.<\/li>\n<\/ul>\n<h2>Android<\/h2>\n<p>There have been multiple bugs fixed to ensure that <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1370333\"><code>pageActions<\/code><\/a> and <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1392322\"><code>browserActions<\/code><\/a> work well on Android. There has been multiple <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1364945\"><code>options_ui<\/code><\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1386316\">fixes<\/a> and some additions. The <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1364945\"><code>runtime.openOptionsPage<\/code><\/a> API has been added, and for those pages the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1389911\"><code>activeTab<\/code><\/a> permission takes effect. The <code>browser_action.default_popup<\/code> manifest property along with <code>setPopup<\/code> and <code>getPopup<\/code> has been added.<\/p>\n<p>Firefox for Android now has support for <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1379833\">installation permission prompts<\/a> from the user, closely matching Desktop. When a user installs an add-on, they will be given a permission prompt.<\/p>\n<p>Here\u2019s an example when installing <a href=\"https:\/\/addons.mozilla.org\/firefox\/addon\/ublock-origin\/?utm_source=blog.mozilla.org&amp;utm_medium=post&amp;utm_campaign=2017-09-webext\">uBlock Origin<\/a>:<\/p>\n<p><a href=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image5.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-8267 size-medium\" src=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image5-252x396.png\" alt=\"\" width=\"252\" height=\"396\" srcset=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image5-252x396.png 252w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image5-768x1206.png 768w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image5-600x942.png 600w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image5.png 1067w\" sizes=\"(max-width: 252px) 100vw, 252px\" \/><\/a><\/p>\n<p>If an extension chooses not to use installation permissions, the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1392176\">optional permission<\/a> prompts have also been implemented which <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/API\/permissions\/request\">enable permission prompts at runtime<\/a>.<\/p>\n<h2>Startup check<\/h2>\n<p>Firefox has had a brief compatibility check that occurs each time Firefox upgrades a major release. Because there are some extension that might update from legacy extensions sometime after Firefox 57 is released, we wanted to ensure that we could update users to new WebExtensions version when we can.<\/p>\n<p>We took the opportunity to streamline this. The new check is quick and will only occur each time you upgrade to a major version (for example 56 to 57) <i>and <\/i>have legacy extensions:<\/p>\n<p><a href=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image6.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-8268\" src=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image6.png\" alt=\"\" width=\"1020\" height=\"254\" srcset=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image6.png 1020w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image6-252x63.png 252w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image6-768x191.png 768w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image6-600x149.png 600w\" sizes=\"(max-width: 1020px) 100vw, 1020px\" \/><\/a><\/p>\n<h2>User notification<\/h2>\n<p>There\u2019s an ongoing project to show Firefox users what changes extensions make to their browser. Often it\u2019s not clear to a user what an extension has done. It can be especially confusing if a user forgets what extensions are installed and finds changes they don\u2019t understand later on.<\/p>\n<p>An API was added that allows extensions to read the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1322308\">home page and new page<\/a> values so extensions can tell if a user or another extension has changed the values. Along with this API, we\u2019re now surfacing changes through to the about:preferences pages. If an extension uses the provided APIs to change: the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1354344\">home page<\/a>, the new tab or <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1342584\">contextual identities<\/a> in Firefox 57, then a message will displayed to the user.<\/p>\n<p>Here\u2019s an example where an extension changes the home page:<\/p>\n<p><a href=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-8265\" src=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image3.png\" alt=\"\" width=\"1436\" height=\"320\" srcset=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image3.png 1436w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image3-252x56.png 252w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image3-768x171.png 768w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image3-600x134.png 600w\" sizes=\"(max-width: 1436px) 100vw, 1436px\" \/><\/a><\/p>\n<p>An example where an extension enables <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/API\/contextualIdentities\">contextual identities<\/a>:<\/p>\n<p><a href=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image4.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-8266\" src=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image4.png\" alt=\"\" width=\"1374\" height=\"184\" srcset=\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image4.png 1374w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image4-252x34.png 252w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image4-768x103.png 768w, https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image4-600x80.png 600w\" sizes=\"(max-width: 1374px) 100vw, 1374px\" \/><\/a><\/p>\n<p>Long running scripts in an extension will now<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1356334\"> generate a warning<\/a> that mentions the extension name, so users can choose what to do with extensions that might be taking a long time.<\/p>\n<p>If an extension changes the new tab <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/manifest.json\/chrome_url_overrides\">through the API<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1372996\">the URL bar will be empty<\/a> when the new tab page is opened. This allows keyboard users to quickly navigate to new URLs. We\u2019ve also fixed a bug where the identity was not shown in the URL bar for new tabs.<\/p>\n<p>Over the coming releases we plan to <a href=\"https:\/\/wiki.mozilla.org\/Add-ons\/Projects\/Jazz\">add in more information<\/a> into about:preferences for more and more APIs.<\/p>\n<h2>Contributors<\/h2>\n<p>Thank you once again to our many contributors for this release, especially our volunteers including: <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=a.hillier%40outlook.com\">Adam Hillier<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=angelsl%40in04.sg\">angelsl<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=dw-dev%40gmx.com\">dw-dev<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=jh%2Bbugzilla%40buttercookie.de\">Jan Henning<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=kevinhowjones%40gmail.com\">Kevin Jones<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=ljbousfield%40gmail.com\">Lee Bousfield<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=tomica%40gmail.com\">Tomislav Jovanovic<\/a> and <a href=\"https:\/\/bugzilla.mozilla.org\/user_profile?login=tushar.saini1285%40gmail.com\">Tushar Saini<\/a>. This release marked a record 171 bugs fixed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firefox 57 has reached Beta, and a bevy of new APIs and improvements have landed that will put us in a good place for the Firefox Quantum launch in November. &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/\">Read more<\/a><\/p>\n","protected":false},"author":271,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[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 57 - 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\/2017\/09\/28\/webextensions-in-firefox-57\/\" \/>\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=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/\",\"name\":\"WebExtensions in Firefox 57 - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1.png\",\"datePublished\":\"2017-09-28T20:32:31+00:00\",\"dateModified\":\"2018-09-03T19:44:54+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/#primaryimage\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1.png\",\"contentUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1.png\",\"width\":1729,\"height\":266},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WebExtensions in Firefox 57\"}]},{\"@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 57 - 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\/2017\/09\/28\/webextensions-in-firefox-57\/","twitter_misc":{"Written by":"Andy McKay","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/","url":"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/","name":"WebExtensions in Firefox 57 - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/#primaryimage"},"image":{"@id":"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1.png","datePublished":"2017-09-28T20:32:31+00:00","dateModified":"2018-09-03T19:44:54+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/#primaryimage","url":"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1.png","contentUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2017\/09\/image1.png","width":1729,"height":266},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2017\/09\/28\/webextensions-in-firefox-57\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"WebExtensions in Firefox 57"}]},{"@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\/8262"}],"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=8262"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/8262\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=8262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=8262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=8262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}