M
Mike Cain
Hi I have a JS library that I want others in my company to use that uses
AttachEvent (etc) to add a method to the onLoad event so that it is called.
Using this approach of course is good because then my onLoad event does not
clobber that of others programmers in my company that may be already using
onLoad for something else (in this case both their onLoad event and mine
will fire).
However I'm finding that in some cases it is important that my onLoad event
fires prior to the other one. Or in some cases vice-versa.
Is there any way when calling AttachEvent (or equivalents) to tell the
browser to call your event last or first in the chain of onLoads?
If not what would be the recommended solution to ensure my library can be
included with other peoples JS libraries yet control itself to fire last (or
in some cases first)?
Thanks!
AttachEvent (etc) to add a method to the onLoad event so that it is called.
Using this approach of course is good because then my onLoad event does not
clobber that of others programmers in my company that may be already using
onLoad for something else (in this case both their onLoad event and mine
will fire).
However I'm finding that in some cases it is important that my onLoad event
fires prior to the other one. Or in some cases vice-versa.
Is there any way when calling AttachEvent (or equivalents) to tell the
browser to call your event last or first in the chain of onLoads?
If not what would be the recommended solution to ensure my library can be
included with other peoples JS libraries yet control itself to fire last (or
in some cases first)?
Thanks!