[英]browser.storage.local.set doesn't seem to have any effect
I'm developing a Firefox extension. 我正在开发Firefox扩展。 It's loaded temporarily (via about:debugging) and I'm trying to use the local storage API. 它是临时加载的(通过about:debugging),我正在尝试使用本地存储API。 The following screenshots are of the extension's debug console. 以下屏幕截图是该扩展程序的调试控制台的屏幕截图。
First I set a value: 首先,我设置一个值:
But it doesn't seem to be there: 但它似乎不存在:
I do have the "storage" permission in my manifest and my extension has an ID. 我的清单中确实具有“存储”权限,并且扩展名具有ID。
The localStorage
in the browser is not the same as the storage.local
for an extension. 浏览器中的localStorage
与扩展名的storage.local
。 Instead, try getting the value once it's set and log it from there. 相反,尝试在设置值后获取该值,然后从那里记录下来。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.