How can I access the JavaScript global object ("window") inside an embedded browser object (the IWebBrowser2 interface)?
- by John Factorial
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?