Can I have some synchronisation mechanism (e.g. locks) in a Firefox extension's JavaScript code?
I added code according to https://developer.mozilla.org/en-US/docs/Code_snippets/On_page_load to make my extension do something each time a page is loaded, and I want to control the sequence of functions that are run inside my extension's JavaScript code.
Is there some way to achieve this using some synchronisation mechanism (e.g. locks) in a Firefox extension's JavaScript code?
Just as a wild guess, do I need to use web workers for this?