javascript - What makes an argument into an event object? -



javascript - What makes an argument into an event object? -

as noted in this question, in function

function(e){ e.stoppropogation(); }

e event object. why? first , argument assumed event? if there 2 arguments? how create sec refer event instead? or simple saying

function(something,x){ x.stoppropogation(); }

because assume x undefined, , wouldn't expect automatically become event object virtue of having event methods called on it.

for dom events, first argument (and 1 usually) event object.

for frameworks, depends on implementation, maintain consistency pass event in first parameter well..

you right assume x undefined..

have @ https://developer.mozilla.org/en/dom/event

javascript

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -