Testing Image onload Event Handler

Testing Image onload Event Handler

This week I have been writing a simple test case to test whether an image can be loaded multiple times on the same web page. The test case  is written in HTML, CSS and JavaScript. The purpose of this was to test whether any particular browser has a bug with loading the same image multiple times or not.

GitHub Pages

Github has cool feature which enables you to host your web page. The benefits of this, that it saves time (instead of renting\hosting your own server) by letting you publish your web page using GitHub Pages.

On the right we have the simple test case example which I have created.  The Image that we are testing with is the torch. When clicking on the button below it will call the onload event handler which will set the image with the same source file , if this succeeds, then the torch will light up. The example on the right were tested on Opera Browser.

Image onload Test Example

Leave a Reply

Your email address will not be published. Required fields are marked *