Skip to content

Commit e28f20f

Browse files
committed
Update WebResourceResponseReceived.md
1 parent 558627b commit e28f20f

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

specs/WebResourceResponseReceived.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ The WebView2 team has been asked for an API to get the response for a web
33
resource as it was received and to provide request headers not available when
44
`WebResourceRequested` event is raised (such as HTTP Authentication headers).
55
The `WebResourceResponseReceived` event provides such response representation
6-
and exposes the request as committed.
6+
and exposes the request as committed. A web request is any URI resolution the
7+
WebView performs. This includes declarative `<img src="...">` from HTML,
8+
implicit `favicon.ico` lookups, and JavaScript in the document calling the
9+
`fetch(...)` API.
710

811
In this document we describe the new API. We'd appreciate your feedback.
912

@@ -19,7 +22,9 @@ web resource. It provides access to both the response as it was received and the
1922
request as it was committed, including modifications made by the network stack
2023
(such as the adding of HTTP Authorization headers). The app can use this event
2124
to view the actual request and response for a web resource. Modifications to
22-
these objects are set but have no effect on WebView processing them.
25+
these objects are set but have no effect on WebView processing them. There is no
26+
ordering guarantee between WebView processing the response and the host app's
27+
event handler running.
2328

2429
When the event is raised, the WebView will pass a
2530
`WebResourceResponseReceivedEventArgs`, which lets the app view the request and
@@ -136,11 +141,13 @@ library WebView2
136141

137142
/// Add an event handler for the WebResourceResponseReceived event.
138143
/// WebResourceResponseReceived event is raised after the WebView has received
139-
/// and processed the response for a WebResource request. The event args
140-
/// include the WebResourceRequest as committed and the WebResourceResponse
141-
/// received, not including the Content, but including any additional headers
142-
/// added by the network stack that were not be included as part of the
143-
/// associated WebResourceRequested event, such as Authentication headers.
144+
/// the response for a WebResource request. The event args include the
145+
/// WebResourceRequest as committed and the WebResourceResponse received,
146+
/// not including the Content, but including any additional headers added by
147+
/// the network stack that were not be included as part of the associated
148+
/// WebResourceRequested event, such as Authentication headers. There is no
149+
/// ordering guarantee between WebView processing the response and the host
150+
/// app's event handler running.
144151
HRESULT add_WebResourceResponseReceived(
145152
[in] ICoreWebView2WebResourceResponseReceivedEventHandler* eventHandler,
146153
[out] EventRegistrationToken* token);
@@ -166,7 +173,7 @@ library WebView2
166173
}
167174

168175
/// Completion handler for PopulateResponseContent async method. It's invoked
169-
/// when the Content stream of the Response of a WebResourceResponseReceieved
176+
/// when the Content stream of the Response of a WebResourceResponseReceived
170177
/// event is available.
171178
interface ICoreWebView2WebResourceResponseReceivedEventArgsPopulateResponseContentCompletedHandler : IUnknown
172179
{

0 commit comments

Comments
 (0)