topic description
In the original, the following related code partially withdraws the early return and delayed execution of the Corialization function, and the in the code only needs to determine the
browser type once. My understanding of the code is that every time addEvent
is actually called, the code executes a function, and then if (window.addEventListener) {.}
makes a browser judgment.
feels that my idea is at odds with the author"s, so I want to ask why if (window.addEventListener)
is only executed once in practice. Even if addEvent
is called next time, browser judgment will not be made
sources of topics and their own ideas
this is a case I saw on the Nuggets, with the code at the end