Is event a global variable that is accessible everywhere inside the callback chain?

后端 未结 1 659
再見小時候
再見小時候 2020-12-03 16:42

I was just playing around with event listeners with DOM and Javascript and did notice this:

function chained(msg) {
    console.log(msg, event);
}

function o         


        
1条回答
  •  北海茫月
    2020-12-03 17:32

    One can access the current event through window.event. Just using event is implicitly accessing window.event.

    0 讨论(0)
提交回复
热议问题