Open
Description
I am unable to view or debug the webview script when the script is set via NavigateToString
To reproduce:
- Start with the win32 WebView2GettingStarted solution
- Instead of
Navigate('bing.com')
useNavigateToString()
and load some HTML with javascriptwebviewWindow->NavigateToString(LR"( <html><head> <script> window.addEventListener('DOMContentLoaded', ()=>{ document.body.querySelector('div').textContent = 'Goodbye'; }; </script> </head> <body> <div>Hello</div> <div>World</div> </body> </html>)");
- Run the app and open the developer
- There is no script available on the
Sources
tab
Versions
Visual Studio: 16.8.6
MSVC v142
WebView2 1.0.705.50 via nuget
Win32
Win10 18363