Subj : Re: Accessing an event via a window... To : Mike Brown From : Brendan Eich Date : Mon May 12 2003 11:15 pm Mike Brown wrote: >I'm attempting to write a piece of Mozilla Javascript, and it's in a >function that is NOT an event handler. The sad part is - I need access >to an event. > > Wrong newsgroup -- see followup-to:. >The only piece of info I have available in that function is the window >object. In IE, I can use the "window.event" convenience, and the rest >of the code flows nicely. Mozilla, however, doesn't seem to allow >access to the event register. > > Why do you want access to the last event sent to an element in the window's document object model? Aren't you really interested only in a certain event, or kind of event? >Is there any way to access an event when you are not in an event >handler? I cannot put this code in an event handler because it >operates on *any* browsed web page - I can't control what element will >raise the event. > > The mozilla.dom people can probably give better advice, but I would say you want to avoid writing non-standard, IE-only script, so the right question is: how do you solve the underlying problem you're trying to solve, not how do you get window.event in Mozilla. The latter ain't gonna happen. /be >Thanks, > >Mike > > .