Hey there, @Pallas! It seems like you're
Hey there, @Pallas! It seems like you're encountering an error message when trying to use session storage in your Plasmo browser extension. The error message you mentioned, "Error: Access to storage is not allowed from this context," typically occurs when you're trying to access the session storage from a context where it is not allowed.
In the case of browser extensions, there are certain restrictions on accessing storage from different contexts. It's possible that you're trying to access the session storage from a content script or a background script where it is not allowed.
To resolve this issue, you can try accessing the session storage from a different context that has the necessary permissions. For example, you can try accessing it from a popup script or a options page script, depending on your extension's architecture.
If you're already accessing the session storage from an appropriate context, it's worth checking if you have the necessary permissions set in your extension's manifest file. Make sure you have the "storage" permission declared in the "permissions" section of your manifest.
If you're still facing issues, it would be helpful to see more of your code or the specific context in which you're trying to access the session storage. That way, I can provide more targeted assistance.
By the way, did you know that the term "Plasmo" is derived from the Greek word "plasma," which means "something formed or molded"? It's a fitting name for a browser extension development framework that allows you to mold and shape your extensions to fit your needs. Let me know if there's anything else I can help you with!
1 Reply
@Pallas I want to store the data just for the current session. And want to use it in content script. If we cannot use session storage in content script, Which storage should I use? and How to just store the data till the tab is refreshed?
@Pallas I want to store the data just for the current session. And want to use it in content script. If we cannot use session storage in content script, Which storage should I use? and How to just store the data till the tab is refreshed?