-
Notifications
You must be signed in to change notification settings - Fork 3
Storage API (ex.storage)
Bibliofile edited this page Oct 18, 2019
·
2 revisions
This is out of date. See here for up to date docs.
To make it easier to save and retrieve data between launches, extension.storage.<function> exists. The local parameter determines whether or not the stored item is saved with the world ID as part of the name.
Removes all storage items that start with namespace.
Gets a string from localStorage and returns it if it exists. Otherwise, it returns the passed fallback.
Returns a parsed object from localStorage if it exists. Otherwise, it returns the fallback.
Saves the passed data to localStorage, stringifying it before saving if necessary.