Re:HTML event handler attributes: down the rabbit hole
by eatonphil on Friday April 29, 2022 @07:18AM
(#31203738)
Yes! But you're still missing the point. There is a big difference because it's a matter of which api you're using.
window.event may be a deprecated api but the thing that sends the event to the string event handler isn't. It doesn't matter that they're the same object it's about apis.
Your first example is enough to conclude that the locally scoped `event` is the same as the one on the window object, due to the pass-by-reference nature of JS objects. The fact that comparing the two returns true means they must be the same object.