Hi,
Is it possible to pass the object 'obj' like so and still be able to access the event properties:
this.addEventListener('mousedown', this.doSomething(obj), false);
and in the function 'doSomething', still be able to access the event properties?
for example:
doSomething:function(obj, e){
alert(obj); //should print '[object HTMLDivElement]'
alert(e); //hopefully print out '[object mouseEvent]'
}
I need to access both the object passed and the event properties.
Thanks in advance
Is it possible to pass the object 'obj' like so and still be able to access the event properties:
this.addEventListener('mousedown', this.doSomething(obj), false);
and in the function 'doSomething', still be able to access the event properties?
for example:
doSomething:function(obj, e){
alert(obj); //should print '[object HTMLDivElement]'
alert(e); //hopefully print out '[object mouseEvent]'
}
I need to access both the object passed and the event properties.
Thanks in advance