SetVirtualHostNameToFolderMapping
Interface AntView
Type: Method
Parameters: String hostName String folderPath TxHostResourceAccessKind accessKind
Returns: nothing
Map a virtual host Name to a folder Path in the current file system.
Use ClearVirtualHostNameToFolderMapping to remove the folder mapping.
Below is an example in DataFlex on how-to set the "rijksmuseum.local" domain hostname to a local folder on the file system that can look like "C:\Users\Public\Documents\DataFlex Demo\AppHtml\"
Procedure OnComCreateWebviewCompleted Integer llHResult
Boolean bIsCreated
String sPath
Get ComWebViewCreated to bIsCreated
If (bIsCreated) Begin
Get psAppHtmlPath of (phoWorkspace(ghoApplication)) to sPath
Send ComSetVirtualHostNameToFolderMapping "rijksmuseum.local" sPath OLEhrakAllow
End
End_Procedure
A currently known issue with the .local TLD is that it can add an additional 2 second delay on resolving the first time.
See also: MS Edge WebView2 github issue #2381
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/30/2024