I’m new to this forum, and would appreciate some help.
I’m having an issue in allowing my add-on to remove browser’s DOM storage. Currently it manipulates webappsstore.sqlite directly, but this approach leaves DOM storage in cache, requiring user to close an existing tab and reopen it again.
I figured there must be a better approach to this, so I tried the following:
var localStorage = domStorageManager.getLocalStorageForPrincipal(Cc["@mozilla.org/systemprincipal;1"].createInstance(Ci.nsIPrincipal), tab.url.uri);
However this gives me an error: Message: [Exception… “Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMStorageM
anager.getLocalStorageForPrincipal]” nsresult: “0x80040111 (NS_ERROR_NOT_AVAILABLE)”
Is there anything I’m doing wrong here? Is there a better approach to managing DOM storage?