I am trying to access the localStorage of a page from a Firefox extension. My understanding is that content
gives a reference to the window
of the cur
From a Firefox extension, you can access the localStorage object with window.content.localStorage, for example:
var ls = window.content.localStorage;
ls.setItem("myvariable", "myvalue");
var item = ls.getItem("myvariable");
Anything else will give you a "Component not available" error.
As an aside, globalStorage doesn't work this way. You can't use it at all with an extension because the object is only available if it's run from a server.