Skip to content Skip to sidebar Skip to footer

Event Global Object In Firefox

Consider the following code: function myFunction() { console.log(event); } event is a global object an

Solution 1:

Firefox's KeyboardEvent() expect event passed to the function Try this

<input id="myinput" type="text" size="40" onkeydown="myFunction(event)">

function myFunction(event){
    if(typeof event === 'undefined')
    {
        event = window.event;
    }

console.log(event);

}

Post a Comment for "Event Global Object In Firefox"