I have a document, which has two javascript functions A(); and B();.The functions get called in no particular order, I want to do something upon the last call.
I can accomplish the task by using local variables, but before doing so I’d like to confirm if there’s more elegant/robust way for doing that – I might have more than two such functions, which makes local vars solution a complete mess.
Update 1 – More details
I’ve a few SilverLight plugins on a page, each has
<param name="onLoad" value="pluginLoaded" />
I can’t go any further than “pluginLoaded” no paramters no nothing.
The plugins get loaded in an absolute random order, upon the overall completion I want to call another function.
We do this by redifining the functions:
You now have:
Just do
EDIT: After requirement “I’d like doA & doB to be called just once each”