Re: addEventListener on my own extension?
Neil Deakin <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
Simon wrote: > On Nov 15, 5:29 pm, Neil Deakin <[email protected]> wrote: >> Those are internal classes that you shouldn't be using. >> >> In your case, obj just needs to implement the event target interface, >> which is documented in the dom spec: >> >> http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget > > thanks a lot! So I did it, but now i have a new problem. > I want use the > nsEventDispatcher::CreateEvent(nsnull, nsnull, NS_LITERAL_STRING > ("datacontainerevent"), dataEvent); > function to get an event-instance. > I have already included the nsEventDispatcher.h but the compiler > prints following error-messages: > -- > error: ‘nsEventDispatcher’ has not been declared > error: ‘CreateEvent’ was not declared in this scope > -- > You should really be using the dom specs or documentation on developer.mozilla.org for these kinds of things. It looks like you're just searching the source code. That may be useful to further understanding but it leads to finding all kinds of internal functions and classes that either shouldn't or can't be used from outside. In general any object that begins 'ns' without the 'nsI' isn't publicly useful. Everything you need to know to send and receive events (from Javascript or C++) is documented in lots of places.