Questions
Questions copied to clipboard
Is it possible to load XML contents in WebView2 (instead of WebBrowser) ?
I want to upgrade the browser from WebBrowser to WebView2 in our existing application (written in Visual C++).
Using WebBrowser, I normally loaded images in a tabular format (arranged by defining in XSL). Also I could able to do operations(like Image drag and drop) within this table using JS(with DOM architecture).
By upgrading to WebView2, I want to able to do the same operations as above(In WebBrowser).
I just tried below things,
- Created instance of ICoreWebView2.
- Invoked ICoreWebView2->Navigate(url) Here I passed local path of XML file as url parameter. I tried adding the below code before CreateCoreWebView2EnvironmentWithOptions() function call, options->put_AdditionalBrowserArguments(L"--allow-file-access-from-files")
I want to provide the same support using WebView2 by replacing WebBrowser. Anybody please provide suggestions, is this possible to do ?