Parikshit-Hooda / mozilla_extensions

Repo to fiddle with mozilla extensions
0 stars 0 forks source link

setup communication to obtain source and target language data in Extension Context #2

Open Parikshit-Hooda opened 3 years ago

Parikshit-Hooda commented 3 years ago

Send data from content_script1.js to background.js.

Data:

Parikshit-Hooda commented 3 years ago

useful link: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/sendMessage.

Parikshit-Hooda commented 3 years ago

more useful links:

Prospective solution to only send message to a certain tab: send tabId from content script to background. Then from background, send message to content script to get sourceData and targetData.