Quantcast

window.open, waiting for document loading

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

window.open, waiting for document loading

YuLo
I have a C++ XPCOM

I need to open another window. I use

ret = mainWindow->Open(nsString(L"chrome://myapp/content/test_win.xul"), nsString(L"wname"), nsString(L"chrome,centerscreen,resizable=true"), &w);

then I need to wait until the page is loaded.
Other way the program crashes after

w->GetDocument(&d);

In Javascript I can use onload="calllback_func" in window tag.
How to do it in C++?
Searching all day in MDN and google have not helped.
 
_______________________________________________
dev-tech-xpcom mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xpcom
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: window.open, waiting for document loading

YuLo
On Sunday, December 8, 2013 1:57:04 AM UTC+4, Yury Lobanov wrote:

> I have a C++ XPCOM
>
>
>
> I need to open another window. I use
>
>
>
> ret = mainWindow->Open(nsString(L"chrome://myapp/content/test_win.xul"), nsString(L"wname"), nsString(L"chrome,centerscreen,resizable=true"), &w);
>
>
>
> then I need to wait until the page is loaded.
>
> Other way the program crashes after
>
>
>
> w->GetDocument(&d);
>
>
>
> In Javascript I can use onload="calllback_func" in window tag.
>
> How to do it in C++?
>
> Searching all day in MDN and google have not helped.

The problem solved by adding event listener to window object.
_______________________________________________
dev-tech-xpcom mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xpcom
Loading...