Hi,
I'm currently experimenting with custom (level 2 DOM) events and I've now arrived at the problem that addEventListener()
will not accept callbacks that return a value -- or at least I'm unfamiliar with the proper approach to this.
Basically what I want is this:
addEventListener("customEvent",
function() {
return true ;
},
false) ;
so that if I create an instance of a wrapper function new wrapper()
,
function wrapper() {
addEventListener(...) ;
}
this will properly return, true
whenever the event is triggered and caught.
Please keep in mind that this is experimental: I am aware that there are a plethora of solutions that do not require a return from an addEventListener
method. I'm just curious whether there is a work-around or if this is in fact a dead-end and I should not bother.
Thanks for your help!