Skip to content

Commit e8a9e20

Browse files
authored
Update HostResourceMapping.md
To simplify API and make them more consistent among different flavors, using string instead of HostName as input hostName type.
1 parent 5692f4b commit e8a9e20

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

specs/HostResourceMapping.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ for `book1.example` host name so that it can be accessed using normal http/https
3333
Windows.Storage.StorageFolder localFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
3434
string book1Path = localFolder.Path + @"\book1";
3535
webView.CoreWebView2.SetVirtualHostNameToFolderMapping(
36-
new Windows.Networking.HostName("book1.example"),
36+
"book1.example",
3737
book1Path, CoreWebView2HostResourceAccessKind.DenyCors);
3838
webView.Source = new Uri("https://book1.example/index.html");
3939
```
@@ -170,7 +170,7 @@ interface ICoreWebView2_2 : ICoreWebView2 {
170170
}
171171
```
172172

173-
## .Net
173+
## .Net WinRT
174174

175175
```c#
176176
namespace Microsoft.Web.WebView2.Core
@@ -190,24 +190,3 @@ namespace Microsoft.Web.WebView2.Core
190190
}
191191
}
192192
```
193-
194-
## WinRT
195-
196-
```c#
197-
namespace Microsoft.Web.WebView2.Core
198-
{
199-
public enum CoreWebView2HostResourceAccessKind
200-
{
201-
Deny = 0,
202-
Allow = 1,
203-
DenyCors = 2
204-
}
205-
206-
public partial class CoreWebView2
207-
{
208-
// There are other API in this interface that we are not showing
209-
public void SetVirtualHostNameToFolderMapping(Windows.Networking.HostName hostName, string folderPath, CoreWebView2HostResourceAccessKind accessKind);
210-
public void ClearVirtualHostNameToFolderMapping(string hostName);
211-
}
212-
}
213-
```

0 commit comments

Comments
 (0)