javascript - What HTML5 images events are available to the developer -


i have created html5 web app.

i use image control.

when image src assigned set local variable =1 when image has finished loading set 0.

if variable = 0 , there image available server repeat process.

if img.onerror raised set local variable 0

i have noticed if mobile loses internet connection , gets local variable 'stuck' on 1 , img.src never updated. not happen time though.

i guessing neither img.onload or img.onerror has been raised. question there other events img control raises can put handler in for?

the code:

my js function notified signalr image available on server.

if (imageisloaded1.status = 0) {     var d = new date();     var n = d.gettime();     imageisloaded1.status = 1;                        staticimgarray.src = './newframe.ashx?a=' + n }  staticimgarray.onload = function () { imageisloaded1.status = 0; }; staticimgarray.onerror = function () { imageisloaded1.status = 0; }; 

according official html5 specification, here idl definition of possible global event handlers. image element element should support these handlers.

interface globaleventhandlers {        attribute eventhandler onabort;        attribute eventhandler onblur;        attribute eventhandler oncancel;        attribute eventhandler oncanplay;        attribute eventhandler oncanplaythrough;        attribute eventhandler onchange;        attribute eventhandler onclick;        attribute eventhandler oncuechange;        attribute eventhandler ondblclick;        attribute eventhandler ondurationchange;        attribute eventhandler onemptied;        attribute eventhandler onended;        attribute onerroreventhandler onerror;        attribute eventhandler onfocus;        attribute eventhandler oninput;        attribute eventhandler oninvalid;        attribute eventhandler onkeydown;        attribute eventhandler onkeypress;        attribute eventhandler onkeyup;        attribute eventhandler onload;        attribute eventhandler onloadeddata;        attribute eventhandler onloadedmetadata;        attribute eventhandler onloadstart;        attribute eventhandler onmousedown;        attribute eventhandler onmouseenter;        attribute eventhandler onmouseleave;        attribute eventhandler onmousemove;        attribute eventhandler onmouseout;        attribute eventhandler onmouseover;        attribute eventhandler onmouseup;        attribute eventhandler onmousewheel;        attribute eventhandler onpause;        attribute eventhandler onplay;        attribute eventhandler onplaying;        attribute eventhandler onprogress;        attribute eventhandler onratechange;        attribute eventhandler onreset;        attribute eventhandler onresize;        attribute eventhandler onscroll;        attribute eventhandler onseeked;        attribute eventhandler onseeking;        attribute eventhandler onselect;        attribute eventhandler onshow;        attribute eventhandler onstalled;        attribute eventhandler onsubmit;        attribute eventhandler onsuspend;        attribute eventhandler ontimeupdate;        attribute eventhandler ontoggle;        attribute eventhandler onvolumechange;        attribute eventhandler onwaiting; }; 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -