sponnusa / firebreath

Automatically exported from code.google.com/p/firebreath
0 stars 0 forks source link

AttachedEvent happening before createJSAPI #49

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
According to your wiki docs about the plugin life cycle, the attached event 
should be fired at the very end. I've use all the python scripts to setup a VS 
2010 project. It loads fine, but I'm trying to find a way to capture a plugin 
loaded event so that I can do some custom method registering on load. When I 
attach to the firefox process and set some break points, the AttachedEvent 
fires before the createJSAPI. 

Original issue reported on code.google.com by ChrisDRo...@gmail.com on 23 Jun 2010 at 9:59

GoogleCodeExporter commented 9 years ago
You are correct; that was my mistake.  I have corrected the wiki page to show 
the correct order for createJSAPI.

The AttachedEvent *must* happen before the JSAPI object is created, because the 
BrowserHostWrapper object needs the window handle in order to allow 
asynchronous events.

I would recommend calling a javascript function in the page (possibly 
"registered" through a param tag) to tell your page when the plugin is ready.  
Param tags may not be fully functional, but that should be easy to fix if 
someone wants to look into it a bit.

Original comment by taxilian on 23 Jun 2010 at 10:21