I am going through a Firefox extension code. But I am not able to understand how extension code works. Where does it start its execution?
Is there a starting point like main() in C?
There can be multiple situations for an addon to start.
From the top of my head i can remember the following:
Toolbar button - The extension only does something when you click it, so you could say that the starting point is the function that the button calls.
Context Menu - Same as the , but for context menu item
Event triggered start - The extension may be listening to page load / unload, (etc) events and start from there. In this case look for window.addEventListener(...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With