当前位置:   article > 正文

chrome.storage.local.set 未生效

chrome.storage.local.set

之前chrome.storage.local.set 和 get 一直不起作用

使用以下代码运行成功。

  1. chrome.storage.local.set({ pageState: "main" }).then(() => {
  2. console.log("Value is set");
  3. });
  4. chrome.storage.local.get(["pageState"]).then((result) => {
  5. console.log("Value is " ,result.pageState);
  6. });

来自:Chrome.storage API 解析 | Chrome 浏览器插件

但是想知道chrome.storage.local.set 是存在哪里的?

好像在 localstorage 那里看不到。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/805176
推荐阅读
相关标签
  

闽ICP备14008679号