Is LocalStorage synchronization for Chrome extensions already available?

耗尽温柔 提交于 2019-11-28 07:10:58

问题


I found chromium issue titled "Allow extensions/apps to sync their own settings" that has status 'Fixed'. It's from December 2011. So, does it work? If so, how does it work and where are the docs?

Last time similar question was asked in 2010 and then the answer was to use bookmarks hack. I think it's time to have an update on this topic.

Update: I just found these docs for experimental chrome.storage API. Is this what I'm looking for? Do we have any new alternatives (other than bookmarks) till chrome.storage goes stable?


回答1:


  • chrome.experimental.storage was introduced as an experimental API in Chrome 18.
  • In Chrome 19, the API became restricted to the Dev channel.
  • Since Chrome 20, the API is not experimental any more Docs | Examples.

To use the API, manifest version 2 is required. This is the minimum manifest file to get an extension to work in Chrome 20+:

{
  "name": "test",
  "version": "1",
  "manifest_version": 2,
  "permissions": ["storage"]
}


来源:https://stackoverflow.com/questions/11427340/is-localstorage-synchronization-for-chrome-extensions-already-available

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!