The OpenD Programming Language

ICoreWebView2.NavigateToString

Initiates a navigation to htmlContent as source HTML of a new document. The htmlContent parameter may not be larger than 2 MB (2 * 1024 * 1024 bytes) in total size. The origin of the new page is about:blank.

SetVirtualHostNameToFolderMapping(
    L"appassets.example", L"assets",
    COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY);

WCHAR c_navString[] = LR"
<head><link rel='stylesheet' href ='http://appassets.example/wv2.css'/></head>
<body>
  <img src='http://appassets.example/wv2.png' />
  <p><a href='http://appassets.example/winrt_test.txt'>Click me</a></p>
</body>";
m_webView->NavigateToString(c_navString);

\snippet SettingsComponent.cpp NavigateToString

interface ICoreWebView2
HRESULT
NavigateToString
(
in LPCWSTR htmlContent
)

Meta