How can I access the JavaScript global object ("window") inside an embedded browser object (the IWebBrowser2 interface)?

Posted by John Factorial on Stack Overflow See other posts from Stack Overflow or by John Factorial
Published on 2011-01-14T20:09:25Z Indexed on 2011/01/17 17:53 UTC
Read the original article Hit count: 369

Filed under:
|
|
|

I have an HTML page which embeds an IWebBrowser2 ActiveX (i.e. the control is essentially an Internet Explorer browser). I need to write JavaScript in this HTML page which will remove any window.onresize handler from the page loaded in the IWebBrowser2 control.

IWebBrowser2 exposes the DOM through IWebBrowser2::Document, but this is equivalent to window.document. Is there any way I can get access to window or window.onresize?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about com