Recently I was looking for ways for WebExtensions to back up critical state. The contents of this gist are the very rough test extension I was using to explore options.
There are two main ways of interacting with this extension:
- The extensin's options page (
options.html) has tests for working with<input type="file">, File System Access, and storing file handles in IndexedDB. - The action context menu test ways to save files to disk using web APIs and the WebExtensions Downloads API.
Warning
File System Access tests may be destructive! Create a new temp directory to prevent accidetnally overwiting other files.