NPAPI: is there a way to generate an event to JS?
-
05-07-2019 - |
Question
Is there a way to have an NPAPI plugin generate an event on the host page side? i.e. the page that contains the <embed>
tag instantiating the plugin.
Disclaimer: I am an NPAPI newbie.
Solution
Found a way: on the plugin side, expose an "addEventListener" method and have the JS side use this API to register "listeners".
When an event occurs on the plugin side, iterate through the "listeners".
OTHER TIPS
You probably want this: Generating async Javascript events from browser plugin (NPAPI)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow