Currently in the process of developing a web browser plugin using NPAPI.
The issue I am facing is that my plugin requires a worker thread to handle certain tasks, and I need to pass events back to JavaScript as the worker progresses. However, due to the NPAPI threading model restrictions, it is not permitted for the worker thread to directly call back into NPAPI and invoke Javascript.
One possible solution to this dilemma is utilizing the NPN_PluginThreadAsyncCall function. Nonetheless, this function is relatively new and only supported from Firefox 3 onwards.
I am curious if there are alternative methods to achieve async event delivery and Javascript execution in an NPAPI plugin without relying on NPN_PluginThreadAsyncCall. How did developers address this issue before the introduction of this function?