Hi Everyone,
Two APIs made it into the recent build that we will be removing before the public launch: localStorage
and sessionStorage
While these APIs were undocumented, we believe some plugins may be using them anyway, so we want to alert you asap.
Reasons
It is important to remove any calls to these APIs from your code as soon as possible for a couple of reasons.
First, the APIs will not ship to the public in October. Second, there are issues with their current implementation that may cause XD to crash.
Workaround
The workaround is to use the “plugin data folder” location to store a JSON file on disk. The “plugin data folder” is the result of the Promise returned by:
require("uxp").storage.localFileSystem.getDataFolder()
localStorage
is also using JSON, so it shouldn’t be a major change. Be sure to manually flush preferences data to disk at the right times.