Skip to content Skip to sidebar Skip to footer

How To Fire Events When Plugin Is Loaded

In my plugin I need to be able to fire event(s) once the plugin was loaded. I don't want to use the built in mechanism (adding it in the object params) since I need to be able to c

Solution 1:

onPluginReady is likely to be called before your onLoad callback from the param tag gets called; that means your event handlers aren't attached yet. That's the reason that FireBreath provides the onload param callback -- it gives you a place to attach event handlers and find out that things are loaded.

Edit to clarify from comments:

The callback will be provided with a single parameter which contains a reference to your root JSAPI object. Note that in this case it is not the object or embed tag, just the JSAPI object, so you can use any methods or properties from there.


Post a Comment for "How To Fire Events When Plugin Is Loaded"