How to get IHTMLDocument2 interface in TWebBrowser EdgeMode (SelectedEngine = EdgeOnly)

689 Views Asked by At

I want to use the MSHTML interfaces IHTMLDocument2, IHTMLElement2, IHTMLElementCollection, etc with TWebBrowser.

In Document := WebBrowser.Document as IHTMLDocument2; when TWebbrowser.SelectedEngine = IEOnly then everything is fine.

But, when I changed the property TWebBrowser.SelectedEngine = EdgeOnly or EdgeIfAvailable then WebBrowser.Document is nil.

How can I fix this?

0

There are 0 best solutions below