fang5566
管理员
管理员
  • UID3719
  • 注册日期2005-03-07
  • 最后登录2024-03-21
  • 发帖数18482
  • 经验4836枚
  • 威望5点
  • 贡献值4316点
  • 好评度1115点
  • 社区居民
  • 最爱沙发
  • 忠实会员
  • 终身成就
阅读:2380回复:0

使用 Embedded WebExtension 将原扩展数据转移到 WebExtensions 扩展上

楼主#
更多 发布于:2017-01-21 19:39
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 57, 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.
If you have a legacy extension that writes data to the filesystem, and you’re planning to port it to WebExtensions, Embedded WebExtensions are available now in Firefox 51 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.

What is an Embedded WebExtension?


An Embedded WebExtension is an extension that combines two types of extensions in one, by incorporating a WebExtension inside of a bootstrapped or SDK extension.

Why use an Embedded WebExtension?


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. Examples of these functions 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.
It’s 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.

How do I define an Embedded WebExtension?


To get started, read the documentation below. You can also contact us—we’re here to help you through the transition.
MDN docs: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Embedded_WebExtensions
Examples: https://github.com/mdn/webextensions-examples/tree/master/embedded-webextension-bootstrapped
https://github.com/mdn/webextensions-examples/tree/master/embedded-webextension-sdk






原文:
https://blog.mozilla.org/addons/2017/01/20/migrating-to-webextensions-port-your-stored-data/
Firefox More than meets your experience
游客

返回顶部