Npapi set timer function
I'm still running Firefox 2.0.0. For backward compatibility reasons I'd like to know weather there is a easy way to replace the
开发者_JS百科NPN_PluginThreadAsyncCall, NPN_ScheduleTimer
mechanism that the newer npapi supplies. The only solution that I would come up with is to evaluate a javascript "setTimeout" that would call the plugin then ... -- KE What I'm working on is at: https://sourceforge.net/projects/sockplugin/
Some seem to call it nsapi, so I add the keyword here too: nsapi
The easiest way is to tie into the HWND. for set timer, just use a windows timer on the HWND, and for async call, post a message to the hwnd. the HWND message loop runs on the UI thread with javascript and the browser.
FireBreath uses this approach, but I don't believe it supports Firefox 2 because ff2 is quite old at this point and is missing a lot of features used by FireBreath. Still, you could borrow some code.
精彩评论