Hi,

So here's what I'm doing now :

nsCOMPtr<nsIDOMWindow> domWnd;
rv = mWebBrowser->GetContentDOMWindow(getter_AddRefs(domWnd));

nsCOMPtr<nsIDOMDocument> domdoc;
rv = domWnd->GetDocument(getter_AddRefs(domdoc));
nsCOMPtr<nsIDocument> dom;
dom = do_QueryInterface(domdoc, &rv);
nsCOMPtr<nsIScriptGlobalObject> scriptGlobal = dom->GetScriptGlobalObject();

and GetScriptGlobalObject returns NULL. a call to dom->IsScriptEnabled() 
returns false as well. Is there something that has to be done to turn on 
Javascript support in Gecko? (my dom object is a valid object as far as I can 
tell).

Thanks,
--Richard

"Boris Zbarsky" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Richard wrote:
>> nsCOMPtr<nsIDocument> dom = do_QueryInterface(mWebBrowser, &rv);
> 
> Right.  nsWebBrowser does not implement nsIDocument.
> 
> The safe thing to do here would probably be to get the contentDOMWindow from 
> the 
> web browser, then get the document from that.
> 
> -Bori
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to