Can unrelayEvent support the same parameters as relayEvent?

4 views
Skip to first unread message

John Beales

unread,
Feb 9, 2010, 3:29:41 PM2/9/10
to DOMAssistant
Hi,

I took a quick look at the code for unrelayEvent, and I think that
this is a feature request, (correct me if I'm wrong).

I would like to be able to use unrelayEvent with the same parameters
as relayEvent, that way if I have a list of LIs or something, and in
each LI I have, for example, 2 links, I can unrelayEvent from only 1
of the two links leaving the other's delegated eventhandler intact.

I know this is probably hard because of the anonymous function used by
relayEvent, but I think it would be incredibly useful.

If it's already possible please let me know, and if not I would love
to see it as soon as possible, (I know it's probably too late for 2.8,
but I'll cross my fingers for 2.8.1).

Thanks,

John

Message has been deleted

chenghong

unread,
Feb 11, 2010, 11:48:53 PM2/11/10
to DOMAssistant
Hi John,

Unfortunately unrelayEvent cannot remove specific handlers at the
moment, because of the anonymous function issue that you have
mentioned. It is a possible feature enhancement moving forward.

However, even if unrelayEvent is to accept the same parameters as
relayEvent, I don't think you can pass in a 'selector' parameter which
is different from what you pass in during relayEvent though (like what
you are trying to achieve with the example above).


Chenghong

John Beales

unread,
Feb 19, 2010, 3:07:27 PM2/19/10
to DOMAssistant
Yeah, I can imagine it isn't a very easy enhancement. Hopefully
unrelayEvent can eventually be made to do the exact opposite of
relayEvent. I'll keep my eye out.

John

Reply all
Reply to author
Forward
0 new messages