Re: passing arbitrary object when opening window with windowwatcher
Axel <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <CAHDxmYPsGxjP4+DzM1UN0ed5aSWeb-7rP3hJMJYL1yYtabAVAQ@mail.gmail.com> |
I tried wrappedJSObject too, but did not work, until I read again the doc, and notice that I skipped the most important line from the example : args.wrappedJSObject = args; Sorry for inconvenience and thanks for your answer. 2013/8/6 Neil <[email protected]>: > [email protected] wrote: > >> I'd rather to give my window a JS object and not an array/nsIArray and i'm >> trying to use the trick described at >> https://developer.mozilla.org/en-US/docs/Working_with_windows_in_chrome_code#Example_5.3A_Using_nsIWindowWatcher_for_passing_an_arbritrary_JavaScript_object >> but it seems it does not work anymore (I'm using Xulrunner 22) >> >> The window.argument is a "[xpconnect wrapped nsISupports]" object, and >> window.argument[0] is too. I tried to unwrap() this object without success. >> > The document you linked to said to use .wrappedJSObject, not unwrap(). > > -- > Warning: May contain traces of nuts. > > _______________________________________________ > dev-tech-xul mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-xul