Skip to content

Instantly share code, notes, and snippets.

@grssam
Last active Aug 29, 2015
Embed
What would you like to do?
/**
* Open Browser Toolbox after building your Nightly with the patch from bug 965872 applied.
* Go to Scratchpad Tab
* Run this script
*/
let { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
let { require } = devtools;
let {StorageFront} = require("devtools/server/actors/storage");
let s, a;
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
target.makeRemote().then(() => {
s = StorageFront(target.client, target.form);
s.listStores().then(b => {
console.log(b);
a = b;
a.cookies.getStoreObjects(a.cookies.hosts[0].host).then(console.log)
a.localStorage.getStoreObjects(a.localStorage.hosts[0].host).then(console.log)
});
s.on("stores-update", j => console.log(j));
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment