Closed ZeroGit2015 closed 7 months ago
Use the PopupBrowser demo and set the user agent before setting FArgs.NewWindow.
Read these code comments for more details about the NewWindow property : https://github.com/salvadordf/WebView4Delphi/blob/0a94a1a42e91021844902acbe91d7755735ea90b/source/uWVTypeLibrary.pas#L5036
The UserAgent property may be overridden if the User-Agent header is set in a request : https://github.com/salvadordf/WebView4Delphi/blob/0a94a1a42e91021844902acbe91d7755735ea90b/source/uWVTypeLibrary.pas#L11873
i tried demo, but this demo has same problem. If tag A has attribute target='_blank' user agent on new page no changes(when we click on this A). If tag A has target='blank' everything works correctly.
We don't have access to all the source code of WebView2 and this looks like a WebView2 feature/issue. If the suggestions in my previous message don't work then this is an upstream issue.
UserAgent is not changed if i open link that has target='_blank'
P.S. target = 'blank' works correctly.