{"id":8837,"date":"2020-05-28T21:00:36","date_gmt":"2020-05-29T04:00:36","guid":{"rendered":"http:\/\/blog.mozilla.org\/addons\/?p=8837"},"modified":"2020-07-31T08:42:54","modified_gmt":"2020-07-31T15:42:54","slug":"extensions-in-firefox-77","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/","title":{"rendered":"Extensions in Firefox 77"},"content":{"rendered":"<p>Firefox 77 is loaded with great improvements for the WebExtensions API. These additions to the API will help you provide a great experience for your users.<\/p>\n<h2 id=\"optional-permissions\">Optional Permissions<\/h2>\n<p>Since Firefox 57, users have been able to see what permissions an extension wants to access during the installation process.\u00a0 The addition of any new permissions to the extension triggers another notification that users must accept during the extension\u2019s next update.\u00a0 If they don\u2019t, they won\u2019t receive the updated version.<\/p>\n<p>These notifications were intended to provide transparency about what extensions can do and help users make informed decisions about whether they should complete the installation process. However, we\u2019ve seen that users can feel overwhelmed by repeated prompts. Worse, failure to see and accept new permissions requests for updated versions can leave users stranded on older versions.<\/p>\n<p>We\u2019re addressing this with <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/manifest.json\/optional_permissions\">optional permissions<\/a>.\u00a0 First, we have made a number of permissions optional. Optional permissions don\u2019t trigger a permission prompt for users during installation or when the extension updates. It also means that users have less of a chance of becoming stranded.<\/p>\n<p>If you use the following permissions, please feel welcome to move them from the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/manifest.json\/permissions\">permissions<\/a> manifest.json key to the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/manifest.json\/optional_permissions\">optional_permissions<\/a> key:<\/p>\n<ul>\n<li>management<\/li>\n<li>devtools<\/li>\n<li>browsingData<\/li>\n<li>pkcs11<\/li>\n<li>proxy<\/li>\n<li>session<\/li>\n<\/ul>\n<p>Second, we\u2019re encouraging developers who use optional permissions to <a href=\"https:\/\/extensionworkshop.com\/documentation\/develop\/request-the-right-permissions\/?utm_source=blog.mozilla.org&amp;utm_medium=blog&amp;utm_campaign=extensions-in-firefox-76#request-permissions-at-runtime\">request them at runtime<\/a>. When you use optional permissions with the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/permissions\/request\">permissions.request<\/a> API, permission requests will be triggered when permissions are needed for a feature. Users can then see which permissions are being requested in context of using the extension. For more information, please see our guide on <a href=\"https:\/\/extensionworkshop.com\/documentation\/develop\/request-the-right-permissions\/?utm_source=blog.mozilla.org&amp;utm_medium=blog&amp;utm_campaign=extensions-in-firefox-76#request-permissions-at-runtime\">requesting permissions at runtime<\/a>.<\/p>\n<p>As an added bonus, we\u2019ve also implemented the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/permissions\/onAdded\">permissions.onAdded<\/a> and <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/permissions\/onRemoved\">permissions.onRemoved<\/a> events, allowing you to react to permissions being granted or revoked.<\/p>\n<h2>Merging CSP headers<\/h2>\n<p>Users who have multiple add-ons installed that modify the content security policy headers of requests may have been seeing their add-ons behave erratically and will likely blame the add-on(s) for not working. Luckily, we now properly merge the CSP headers when two add-ons modify them via webRequest. This is especially important for content blockers leveraging the CSP to block resources such as scripts and images.<\/p>\n<h2>Handling SameSite cookie restrictions<\/h2>\n<p>We\u2019ve seen developers trying to work around SameSite cookie restrictions. If you have been using iframes on your extension pages and expecting them to behave like first party frames, the <code>SameSite<\/code> cookie attribute will keep your add-on from working properly. In Firefox 77, the cookies for these frames will behave as if it was a first party request. This should ensure that your extension continues to work as expected.<\/p>\n<h2 id=\"other-updates\">Other updates<\/h2>\n<p>Please also see these additional changes:<\/p>\n<ul>\n<li>The <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/tabs\/duplicate\">tabs.duplicate<\/a> API now allows the position and active status of a duplicated tab to be specified.<\/li>\n<li>We\u2019ve limited the ability to monitor data: URIs using the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/webRequest\">webRequest<\/a> API. This feature was never clearly documented, and is also not supported by Chrome. Please see <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1631933\">the bug<\/a> for more details.<\/li>\n<li>WebExtensions can now also clear IndexedDB and ServiceWorkers by hostname using the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/browsingData\/RemovalOptions\">hostnames removal option<\/a> of <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/browsingData\/remove\">browsingData.remove<\/a>.<\/li>\n<li><a href=\"https:\/\/wiki.developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/tabs\/goBack\">tabs.goBack<\/a> and<a href=\"https:\/\/wiki.developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/tabs\/goForward\"> tabs.goForward<\/a> are now supported.<\/li>\n<\/ul>\n<p>I\u2019m very excited about the number of patches from the community that are included in this release. Please congratulate <a href=\"https:\/\/mozillians.org\/u\/evilpie\/\">Tom Schuster<\/a>, Ajitesh, Tobias, <a href=\"https:\/\/mozillians.org\/u\/ariasuni\/\">M\u00e9lanie Chauvel<\/a>, <a href=\"https:\/\/mozillians.org\/u\/atiqueahmedziad\/\">Atique Ahmed Ziad<\/a>, and a few teams across Mozilla that are bringing these great additions to you. I\u2019m looking forward to finding out what is in store for Firefox 78, please stay tuned!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firefox 77 is loaded with great improvements for the WebExtensions API. These additions to the API will help you provide a great experience for your users. Optional Permissions Since Firefox &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/\">Read more<\/a><\/p>\n","protected":false},"author":333,"featured_media":8750,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,227,278886],"tags":[278873,322929,278875,278871],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Extensions in Firefox 77 - 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\/2020\/05\/28\/extensions-in-firefox-77\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Philipp Kewisch\" \/>\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\/2020\/05\/28\/extensions-in-firefox-77\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/\",\"name\":\"Extensions in Firefox 77 - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2019\/10\/Fx-Browser-icon-fullColor.png\",\"datePublished\":\"2020-05-29T04:00:36+00:00\",\"dateModified\":\"2020-07-31T15:42:54+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/86ecef4a5de728e6d3ffe72a25077a94\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/#primaryimage\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/files\/2019\/10\/Fx-Browser-icon-fullColor.png\",\"contentUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2019\/10\/Fx-Browser-icon-fullColor.png\",\"width\":2048,\"height\":2048,\"caption\":\"Firefox logo\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extensions in Firefox 77\"}]},{\"@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\/86ecef4a5de728e6d3ffe72a25077a94\",\"name\":\"Philipp Kewisch\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c2d92d64a4b77306c45df1c9be647621?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c2d92d64a4b77306c45df1c9be647621?s=96&d=mm&r=g\",\"caption\":\"Philipp Kewisch\"},\"description\":\"Twitter: @pkewisch\",\"sameAs\":[\"https:\/\/twitter.com\/pkewisch\",\"https:\/\/x.com\/pkewisch\"],\"url\":\"https:\/\/blog.mozilla.org\/addons\/author\/calendar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Extensions in Firefox 77 - 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\/2020\/05\/28\/extensions-in-firefox-77\/","twitter_misc":{"Written by":"Philipp Kewisch","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/","url":"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/","name":"Extensions in Firefox 77 - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/#primaryimage"},"image":{"@id":"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2019\/10\/Fx-Browser-icon-fullColor.png","datePublished":"2020-05-29T04:00:36+00:00","dateModified":"2020-07-31T15:42:54+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/86ecef4a5de728e6d3ffe72a25077a94"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/#primaryimage","url":"https:\/\/blog.mozilla.org\/addons\/files\/2019\/10\/Fx-Browser-icon-fullColor.png","contentUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2019\/10\/Fx-Browser-icon-fullColor.png","width":2048,"height":2048,"caption":"Firefox logo"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2020\/05\/28\/extensions-in-firefox-77\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"Extensions in Firefox 77"}]},{"@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\/86ecef4a5de728e6d3ffe72a25077a94","name":"Philipp Kewisch","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c2d92d64a4b77306c45df1c9be647621?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c2d92d64a4b77306c45df1c9be647621?s=96&d=mm&r=g","caption":"Philipp Kewisch"},"description":"Twitter: @pkewisch","sameAs":["https:\/\/twitter.com\/pkewisch","https:\/\/x.com\/pkewisch"],"url":"https:\/\/blog.mozilla.org\/addons\/author\/calendar\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/8837"}],"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\/333"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/comments?post=8837"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/8837\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media\/8750"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=8837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=8837"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=8837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}