The question is variable scope in chrome extension. But i also want information for scope between background page and content scripts
I have a background html and a content script
I have declared a global variable in the start of background page say for example seltext
The content script is listening for mouse up events and in that code i want to update seltext
If this is not possible then i am planning to send seltext value from content script to background page by using sendresponse or i can use local storage. I hope the later will be taking more resources.
Since i am not having an clear picture of chrome extension working completely i am having this doubt.
Any type of response could be helpful.
A partial of what i wanted can be found here
how to comunicate between a content script and a background page
yet detailed information reference about variable scope in chrome extension would be nice.