{"id":8012,"date":"2017-01-20T11:29:45","date_gmt":"2017-01-20T19:29:45","guid":{"rendered":"http:\/\/blog.mozilla.org\/addons\/?p=8012"},"modified":"2017-01-20T11:29:45","modified_gmt":"2017-01-20T19:29:45","slug":"migrating-to-webextensions-port-your-stored-data","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/","title":{"rendered":"Migrating to WebExtensions: port your stored data"},"content":{"rendered":"<p>WebExtensions are the new standard for add-on development in Firefox, and will be the only supported type of extension in release versions of Firefox later this year. Starting in <a href=\"https:\/\/wiki.mozilla.org\/RapidRelease\/Calendar\" target=\"_blank\">Firefox 57<\/a>, which is scheduled to arrive in November 2017, extensions other than WebExtensions will not load, and developers should be preparing to migrate their legacy extensions to WebExtensions.<\/p>\n<p>If you have a legacy extension that writes data to the filesystem, and you\u2019re planning to port it to WebExtensions, <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Embedded_WebExtensions\" target=\"_blank\">Embedded WebExtensions<\/a> are available now in <a href=\"https:\/\/wiki.mozilla.org\/RapidRelease\/Calendar\" target=\"_blank\">Firefox 51<\/a> to help you transition. Embedded WebExtensions can be used to transfer the stored data of your add-on to a format that can be used by WebExtensions. This is essential because it lets you to convert your users without the need for them to take any actions.<\/p>\n<h2>What is an Embedded WebExtension?<\/h2>\n<p>An <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Embedded_WebExtensions\" target=\"_blank\">Embedded WebExtension<\/a> is an extension that combines two types of extensions in one, by incorporating a WebExtension inside of a bootstrapped or SDK extension.<\/p>\n<h2>Why use an Embedded WebExtension?<\/h2>\n<p>There are attributes (functions) of legacy add-ons that are used to store information related to the add-on that are not available in WebExtensions. <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Porting_a_legacy_Firefox_add-on\" target=\"_blank\">Examples of these functions<\/a> include user preferences, arbitrary file system access for storing assets, configuration information, stateful information, and others. If your add-on makes use of functionality like these to store information, you can use an Embedded WebExtension to access your legacy add-on data and move it over to a WebExtension. The earlier you do this, the more likely all your users will transition over smoothly.<\/p>\n<p>It\u2019s important to emphasize that Embedded WebExtensions are intended to be a transition tool, and will not be supported past Firefox 57. They should not be used for add-ons that are not expected to transition to WebExtensions.<\/p>\n<h2>How do I define an Embedded WebExtension?<\/h2>\n<p>To get started, read the documentation below. You can also <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons#contactus\" target=\"_blank\">contact us<\/a>\u2014we\u2019re here to help you through the transition.<\/p>\n<p>MDN docs: <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Embedded_WebExtensions\" target=\"_blank\">https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Embedded_WebExtensions<\/a><\/p>\n<p>Examples: <a href=\"https:\/\/github.com\/mdn\/webextensions-examples\/tree\/master\/embedded-webextension-bootstrapped\" target=\"_blank\">https:\/\/github.com\/mdn\/webextensions-examples\/tree\/master\/embedded-webextension-bootstrapped<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/mdn\/webextensions-examples\/tree\/master\/embedded-webextension-sdk\" target=\"_blank\">https:\/\/github.com\/mdn\/webextensions-examples\/tree\/master\/embedded-webextension-sdk<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WebExtensions are the new standard for add-on development in Firefox, and will be the only supported type of extension in release versions of Firefox later this year. Starting in Firefox &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/\">Read more<\/a><\/p>\n","protected":false},"author":287,"featured_media":7600,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[388,44,742,278886],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Migrating to WebExtensions: port your stored data - 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\/01\/20\/migrating-to-webextensions-port-your-stored-data\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kev Needham\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 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\/01\/20\/migrating-to-webextensions-port-your-stored-data\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/\",\"name\":\"Migrating to WebExtensions: port your stored data - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2015\/11\/firefox_logo-only_RGB.png\",\"datePublished\":\"2017-01-20T19:29:45+00:00\",\"dateModified\":\"2017-01-20T19:29:45+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/2160114edcedd6631a079251326d6a53\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/#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\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Migrating to WebExtensions: port your stored data\"}]},{\"@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\/2160114edcedd6631a079251326d6a53\",\"name\":\"Kev Needham\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7ac7af0738840c3d6aa0bcecbbc0d081?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7ac7af0738840c3d6aa0bcecbbc0d081?s=96&d=mm&r=g\",\"caption\":\"Kev Needham\"},\"description\":\"Canadian Mozillian working to make Add-ons in Firefox awesome.\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/author\/kneedhammozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Migrating to WebExtensions: port your stored data - 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\/01\/20\/migrating-to-webextensions-port-your-stored-data\/","twitter_misc":{"Written by":"Kev Needham","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/","url":"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/","name":"Migrating to WebExtensions: port your stored data - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/#primaryimage"},"image":{"@id":"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2015\/11\/firefox_logo-only_RGB.png","datePublished":"2017-01-20T19:29:45+00:00","dateModified":"2017-01-20T19:29:45+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/2160114edcedd6631a079251326d6a53"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/#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\/2017\/01\/20\/migrating-to-webextensions-port-your-stored-data\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"Migrating to WebExtensions: port your stored data"}]},{"@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\/2160114edcedd6631a079251326d6a53","name":"Kev Needham","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7ac7af0738840c3d6aa0bcecbbc0d081?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7ac7af0738840c3d6aa0bcecbbc0d081?s=96&d=mm&r=g","caption":"Kev Needham"},"description":"Canadian Mozillian working to make Add-ons in Firefox awesome.","url":"https:\/\/blog.mozilla.org\/addons\/author\/kneedhammozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/8012"}],"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\/287"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/comments?post=8012"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/8012\/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=8012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=8012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=8012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}