winforms icon indicating copy to clipboard operation
winforms copied to clipboard

Deprecate `WebBrowser`, `HtmlDocument` and associated types

Open RussKie opened this issue 2 years ago • 2 comments

The WebBrowser control is based on IE Trident engine, which is almost universally unusable for general web browsing these days. It is also based on COM/ActiveX, which poses difficulties in trimming/native AOT scenarios.

Also, Internet Explorer 11 has been retired and is officially out of support as of 15 June 2022. Whilst the underlying Trident engine (mshtml.dll) isn't being removed (yet?) from Windows, the general guidance is to use the modern replacement, which is WebView2 web browser control.

Resolves #6964

Microsoft Reviewers: Open in CodeFlow

RussKie avatar Aug 12 '22 08:08 RussKie

@RussKie, is this being deprecated in .Net7 and removed in .Net8?

elachlan avatar Oct 03 '22 23:10 elachlan

Deprecation only. There are no appetites to remove the types in any forseeable future. The deprecation will help making developers aware of other more modern tech, such as WebView2, which in many cases will benefit end users.

RussKie avatar Oct 04 '22 00:10 RussKie

@RussKie did you want to merge this for .NET8?

elachlan avatar Jan 22 '23 23:01 elachlan

My recollection is that conceptually this change was desirable, but I'd leave this for @dotnet/dotnet-winforms to decide whether they wish to pursue this further. I'd be happy to rebase, if so. This may need to be taken to the API Review Board too.

RussKie avatar Jan 23 '23 00:01 RussKie

@merriemcgaw / @dreddy-work did you want to continue with this PR?

elachlan avatar Jan 23 '23 01:01 elachlan

Thanks for bubbling this back up @elachlan! I am thinking that we shouldn't go further with this because the engine isn't going anywhere any time soon. When Windows decides not to support mshtml.dll then we will go for removing the types. We've removed this control from the toolbox as we want people to move to WebView2 control as soon as possible. I do think it will be a good idea to note in the docs that the underlying IE is no longer supported though. Heading over to file a docs bug 😄

merriemcgaw avatar Jan 27 '23 20:01 merriemcgaw