It is possible to make a global variable same for panel script and page script ?
maybe some hacks like using pointers or maybe some storage locations which can be easily access by panel script and page script. I do not want to send variable with posting messages using port comunnication because I will use this variable in a timer functions which refresh in interval of mileseconds, and web browser will be overloaded if it will post so many messages with system ports. I think it will be better if I can read the variable from a location, which can be easily accessed by panel script and page script. I'm new to firefox add-on builder, how can I achieve this for my addon ?
here I'm attaching panel script, which will read the value saved with page script.
var panel = require("panel").Panel({
width: 100,
height: 100,
contentScriptFile: data.url("panel_script.js")
});
here I'm attaching page script which will save a value from page content and panel script will read it.
var pageMod = require("page-mod");
pageMod.PageMod({
include: "*",
contentScriptFile: self.data.url("page_script.js"),
contentScriptWhen: 'ready'
});
UPDATE:
I want to read the player position which is playing on the page, and I need it to be very accurate as mileseconds and I want to use a timer in my addon panel script to get player position value. If I use port requests then web browser is overloaded with so many requests which take more resources than if I would be able just to save the value in a location which can be readed from panel script easily.