Skip to content

Commit 86f9be3

Browse files
authored
Update API accessibility when suspended.
Allow all API access when suspended.
1 parent a34b81e commit 86f9be3

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

specs/Freeze.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ app normally does not have to call Resume.
9696
The app can call `Resume` and then `TrySuspend` periodically for an invisible WebView so that
9797
the invisible WebView can sync up with latest data and the page ready to show fresh content
9898
when it becomes visible.
99-
When WebView is suspended, While WebView properties can still be accessed, WebView methods are generally not accessible.
100-
After `TrySuspend` is called and until WebView is resumed or `TrySuspend` resulted in not being successfully suspended,
101-
calling WebView methods will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
99+
All WebView APIs can still be accessed when a WebView is suspended. Some APIs like Navigate will auto resume
100+
the WebView. To avoid unexpected auto resume, check `IsSuspended` property before calling APIs that might
101+
change WebView state.
102102
103103
# API Notes
104104
See [API Details](#api-details) section below for API reference.
@@ -130,10 +130,9 @@ interface ICoreWebView2_2 : ICoreWebView2 {
130130
/// The app can call `Resume` and then `TrySuspend` periodically for an invisible WebView so that
131131
/// the invisible WebView can sync up with latest data and the page ready to show fresh content
132132
/// when it becomes visible.
133-
/// When WebView is suspended, while WebView properties can still be accessed, WebView methods are
134-
/// generally not accessible. After `TrySuspend` is called and until WebView is resumed or `TrySuspend`
135-
/// resulted in not being successfully suspended, calling WebView methods will fail with
136-
/// `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
133+
/// All WebView APIs can still be accessed when a WebView is suspended. Some APIs like Navigate
134+
/// will auto resume the WebView. To avoid unexpected auto resume, check `IsSuspended` property
135+
/// before calling APIs that might change WebView state.
137136
HRESULT TrySuspend([in] ICoreWebView2StagingTrySuspendCompletedHandler* handler);
138137
139138
/// Resume the WebView so that it would resume activities on the web page.

0 commit comments

Comments
 (0)