I want to use the same (onload) event handler for all images in a page. I've been adding the event handler to every image object that I create.
loop:
...
aImgObj.onload = myEventHandler;
It seems like I should be able to add it to the image object prototype instead. But I haven't figured out the syntax for it ... been looking around on the web and doing trial and error for an hour now.
Can it be done?
loop:
...
aImgObj.onload = myEventHandler;
It seems like I should be able to add it to the image object prototype instead. But I haven't figured out the syntax for it ... been looking around on the web and doing trial and error for an hour now.
Can it be done?