Page 1 of 1

TWVBrowser.ExecuteScript

Posted: Sun Jan 01, 2023 9:03 am
by polass
do you have a library of examples using TWVBrowser.ExecuteScript please? basic commands, functions, whatever. I've only gotten to the basics so far (document.GetElementBy...). The syntax is a bit different from JavaScript and it's giving me problems. They learn best by examples.

Re: TWVBrowser.ExecuteScript

Posted: Sun Jan 01, 2023 6:45 pm
by salvadordf
Hi,

TWVBrowser.ExecuteScript should execute be the same JavaScript code as any other Chromium based browser.
Microsoft has disabled a few browser features in WebView2 but other than that, you should be able to use normal JS code.