Re: DOMContentLoaded event from C++
YuLo <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <[email protected]> |
четверг, 4 октября 2012 г., 13:35:33 UTC+4 пользователь YuLo написал: > понедельник, 1 октября 2012 г., 19:47:03 UTC+4 пользователь Neil написал: > > > YuLo wrote: > > > > > > > > > > > > >A question for nubie. What function will be fired on event. The second parameter for "AddEventListener" is "this". It is the pointer to class, not function. > > > > > > > > > > > > > > > > > > > > The second parameter is an type. This has a method > > > > > > called handleEvent (or HandleEvent in C++). > > > > > > > > > > > > XPConnect magic allows script to pass a function instead of a class. > > > > > > > Thank you Neil, > > now i understand. > > I implemented nsIDOMEventListener class and can catch events. > > Thanks again! But my problem is not solved yet. I can catch keyboard event but where can i get KeyCode? The event variable of HandleEvent() is of type nsIDOMEvent. Casting it to nsIDOMKeyEvent and using GetKeyCode() crashes XULRunner. _______________________________________________ dev-tech-xul mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xul