[Ur] Access to event object on onclick/et al
Adam Chlipala
adamc at impredicative.com
Sun May 20 06:49:31 EDT 2012
Vladimir Shabanov wrote:
> 2012/5/20 Edward Z. Yang<ezyang at mit.edu>:
>> I'd like to implement different behavior in the case that the shift-key is
>> pressed down and a user clicks on an element, as opposed when nothing is
>> pressed down. It is well known that event objects have a shiftKey attribute
>> which contains precisely this information. However, Ur/Web event handlers
>> have no access to the event object. To add insult to injury, there isn't
>> any way to FFI access to the event object either.
> There is uw_event javascript variable which keeps current event
> handler parameter.
> For accessing event in js FFI you could use something like
> var e = window.event ? window.event : uw_event;
I do expect this will work, but it might be nicer to add a new
argument(s) to appropriate event attribute types. Thoughts?
More information about the Ur
mailing list