chrome.storage.sync undefined?

前端 未结 4 1153
一整个雨季
一整个雨季 2020-12-04 23:05

I\'m trying to use chrome storage in an extension, via a content_script, but I keep failing on

Uncaught TypeError: Cannot read property \'sync\' of undefine         


        
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 23:54

    RELOAD THE EXTENSION

    I had the "permissions" key added in my manifest file but still I struggled to get this fixed.

    After adding the permission:-

    "permissions": [
        "storage"
     ]
    

    Goto your extension using: chrome://extensions/ & click the Reload button:-

提交回复
热议问题