When I parallely do windowWatcher.openWindow() for different urls ,
windows are opening.
But the WebProgressListener document I get is not correct.Document
loading complete occurs for the same url.
1. I addProgressListener after I do windowWatcher.openWindow.
2. My listener has registered for NOTIFY_ALL
3. I remove listener once I get document complete signal.
Is nsIWebProgress progress common for all new window that gets opened.
Can someone tell me what is wrong?
onStatusChange(nsIWebProgress aWebProgress, nsIRequest aRequest, long
aStateFlags, long aStatus)
boolean isLoading=aWebProgress.getIsLoadingDocument();
boolean isDocument = (aStateFlags &
nsIWebProgressListener.STATE_IS_DOCUMENT) != 0;
boolean start = (aStateFlags & nsIWebProgressListener.STATE_START) !
=0;
boolean stop = (aStateFlags & nsIWebProgressListener.STATE_STOP) !
=0;
if((!isLoading) && (!start) && (!isDocument) && stop)
{
factory.progress.removeProgressListener(embed);
window = aWebProgress.getDOMWindow();
document=window.getDocument();
nsIDOMHTMLDocument htmldoc = (nsIDOMHTMLDocument)
document.queryInterface(nsIDOMHTMLDocument.NS_IDOMHTMLDOCUMENT_IID);
System.out.println("############ loading Complete For
"+htmldoc.getURL()+" Title "+htmldoc.getTitle());
}
thanks in advance,
Krithika
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding