1

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?

1 Answers1

2

You should be able to use document.parentWindow:

var controlWindow = control.document.parentWindow;
Phil Booth
  • 4,853
  • 1
  • 33
  • 35