In JavaScript we are allowed to set the multiple listeners on the single event. For example:
element.addEventListener('click',startDragDrop,false);
element.addEventListener('click',spyOnUser,false);
I am planning to do the same in my project. I just want to be sure that it should not cause any problem with the order of the execution of the callback the way it is written on QuirksMode. It says that W3C model does not state which event handler is fired first, so you cannot assume startDragDrop()
is executed before spyOnUser()
. But I want to be sure that my startDragDrop
should be executed first then spyOnUser()
. Is there any way I can make it sure?