Skip to content

Commit dd74890

Browse files
authored
Update Freeze.md
1 parent ce50433 commit dd74890

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

specs/Freeze.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ For an Universal Windows Platform app, the app calls the API in suspended event
1313
async protected void OnSuspending(object sender, SuspendingEventArgs args)
1414
{
1515
SuspendingDeferral deferral = args.SuspendingOperation.GetDeferral();
16+
webView.Visibility = false;
1617
await webView.CoreWebView2.TryFreezeAsync();
1718
deferral.Complete();
1819
}
20+
async protected void OnSuspending(object sender, Object args)
21+
{
22+
webView.CoreWebView2.Unfreeze();
23+
webView.Visibility = true;
24+
}
1925
```
2026
## Win32 C++
2127
As unfreeze is very fast and automatically happens when WebView becomes visible, the app can generaly immediately call `TryFreeze` when a WebView becomes invisible.

0 commit comments

Comments
 (0)