I'm trying to create a HTML website that will trigger a specific firefox add-on when I load the page, is that possible?
I searched around but found nothing about it. How can I make my page interact with the browser's add-ons and trigger some of it's events?
Thanks for reading. any insight will be helpful.
CodePudding user response:
A better Google search pointed me towards this answer on stackoverflow which is for Chrome.
...and then after I knew what I was looking for, I found the mozzila documentation regarding sending a message to an extension here
Syntax as seen on mozzila documentation:
var sending = browser.runtime.sendMessage(
extensionId, // optional string
message, // any
options // optional object
)
The message is what you will want to figure out based on your use case
EDIT: The SO answer provided in my answer should help you quite a lot, as the Firefox API is same as Chrome's Chromium API