Re: addEventListener on my own extension?
Simon <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
On Nov 17, 4:55 pm, Boris Zbarsky <[email protected]> wrote: > Simon wrote: > > ok, that works, but... I need the TextEvent to attache some string on > > the event. I would add the DOMString with the TextEvent - init- > > function (http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events- > > TextEvent). > > Ah. We don't implement initTextEvent, sorry. Ok, i realized it with the MessageEvent. Now it works almost good... But now it is following: 1) open my page, everything is ok. If data received it fire a message- event and shows the string in an alert -- ok. 2) if i want open any other page (like google) i get this error: -- JavaScript strict warning: http://www.google.de/, line 3: test for equality (==) mistyped as assignment (=)? Assertion failure: 0, at /.../mozilla/js/jsd/jsd_scpt.c:806 -- I think it could be associated with my manner to get the window- Element, but didn't know details.. In my extensions constructor i do this: -- nsCOMPtr<nsIWindowWatcher> wwatcher (do_GetService("@mozilla.org/ embedcomp/window-watcher;1")); // The window watcher will be able to give me a handle to the window wwatcher->GetActiveWindow(getter_AddRefs(mWindow)); // get the Active window. mWindow->GetDocument(getter_AddRefs(mDoc)); // get the document from the window. -- Any ideas? Thank you so much once more!