I am developing an extension for Firefox versions 3.0-3.5 using VS2008.
I want to set the attribute to the tab after completing the request to load the document in this tab window.
So, in the OnStateChange method, I check the loading of the document. I used STATE_STOP and STATE_IS_DOCUMENT for this.
I want to determine which tab window was associated with a particular document request.
I have a valid DOM document pointer obtained from nsIWebProgress * aWebProgress, which is the first input of the OnStateChange parameter.
if ((aStateFlags & STATE_STOP) && (aStateFlags & STATE_IS_DOCUMENT)) { nsCOMPtr<nsIDOMWindow> domwin; nsCOMPtr<nsIDOMDocument> domDoc; aWebProgress->GetDOMWindow(getter_AddRefs(domwin)); domwin->GetDocument(getter_AddRefs(domDoc)); }
I tried to get the nsIDOMDocumentXBL pointer using the QIing pointer nsIDOMDocument (domDoc in my example), but it is not with error code 0x80004002 (2147500034) ieNS_ERROR_NO_INTERFACE.
How to get a tab element corresponding to a document download request.
Can anyone help me?
Thanks, Advance, Waibhav D. Gade.
source share