Skip to content

Is it possible to load XML contents in WebView2 (instead of WebBrowser) ? #373

@RatheeshVA

Description

@RatheeshVA

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,

  1. Created instance of ICoreWebView2.
  2. 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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions