javascript - 'event' equivalent in firefox -


i using following code , works fine in chrome.

function daybind(xyzvalue) {     if(event.type == 'click')        alert('mouse clicked') } 

note there no 'event' variable passed function still available me in case of chrome. when use firefox 'event' undefined. tried using following workarounds:

var e=arguments[0] || event; 

also:

var e=window.event || event; 

but none of them worked me. there 'event' equivalent in firefox?

because ie , chrome put event in global object window, can it. in firefox, need let first parameter event.

function daybind(event, xyzvalue) {     var e=event || window.event;     if(event.type == 'click')        alert('mouse clicked') } 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -