@@ -3738,10 +3738,10 @@ NetworkResult = (
37383738)
37393739
37403740NetworkEvent = (
3741- NetworkBeforeRequestSentEvent //
3742- NetworkResponseStartedEvent //
3743- NetworkResponseCompletedEvent //
3744- NetworkFetchErrorEvent
3741+ network.BeforeRequestSent //
3742+ network.ResponseStarted //
3743+ network.ResponseCompleted //
3744+ network.FetchError
37453745)
37463746
37473747</pre>
@@ -3751,16 +3751,16 @@ NetworkEvent = (
37513751#### The network.BaseEventParams type #### {#type-network-BasEventParams}
37523752
37533753<pre class="cddl local-cddl">
3754- NetworkBaseEventParams = {
3755- request: NetworkRequestData ,
3754+ network.BaseParameters = {
3755+ request: network.RequestData ,
37563756 navigation: Navigation / null,
37573757 context: BrowsingContext / null,
37583758 timestamp: int
37593759}
37603760</pre>
37613761
3762- The <code> BaseEventParams </code> type is an abstract type representing the data
3763- that's common to all network events.
3762+ The <code> network.BaseParameters </code> type is an abstract type representing
3763+ the data that's common to all network events.
37643764
37653765<div algorithm>
37663766To <dfn>get the base network event data</dfn> given |request|:
@@ -3786,7 +3786,7 @@ To <dfn>get the base network event data</dfn> given |request|:
37863786
378737871. Let |timestamp| be a [=time value=] representing the current date and time in UTC.
37883788
3789- 1. Let |params| be [=map=] matching the <div> NetworkEventData </div> production, with
3789+ 1. Let |params| be [=map=] matching the <div> network.BaseParameters </div> production, with
37903790 the <code> request</code> field set to |request data|, the |navigation| field
37913791 set to <code> navigation</code> , the <code> context</code> field set to
37923792 |context id|, and the <code> timestamp</code> field set to |timestamp|.
@@ -3800,7 +3800,7 @@ To <dfn>get the base network event data</dfn> given |request|:
38003800[=Remote end definition=] and [=local end definition=]
38013801
38023802<pre class="cddl local-cddl">
3803- NetworkCookie = {
3803+ network.Cookie = {
38043804 name: text,
38053805 ? value: text,
38063806 ? binaryValue: [ uint ]
@@ -3815,7 +3815,7 @@ NetworkCookie = {
38153815};
38163816</pre>
38173817
3818- The <code> Cookie</code> type represents a cookie.
3818+ The <code> network. Cookie</code> type represents a cookie.
38193819
38203820If the cookie value can be represented as a UTF-8 encoded string, the
38213821<code> value</code> field will be present. Otherwise the <code> binaryValue</code>
@@ -3827,7 +3827,7 @@ of the cookie value.
38273827[=Remote end definition=] and [=local end definition=]
38283828
38293829<pre class="cddl local-cddl">
3830- NetworkFetchTimingInfo = {
3830+ network.FetchTimingInfo = {
38313831 requestTime: float,
38323832 redirectStart: float,
38333833 redirectEnd: float,
@@ -3845,7 +3845,7 @@ NetworkFetchTimingInfo = {
38453845};
38463846</pre>
38473847
3848- The <code> FetchTimingInfo</code> type represents the time of each part of
3848+ The <code> network. FetchTimingInfo</code> type represents the time of each part of
38493849the request, relative to <code> requestTime</code> .
38503850
38513851<div algorithm>
@@ -3854,7 +3854,7 @@ To <dfn>get the fetch timings</div> given |request|:
385438541. Let |global| be |request|'s [=request/client=].
38553855
385638561. If |global| is null, return a map matching the
3857- <code>NetworkFetchTimingInfo </code> production, with all fields set to 0.
3857+ <code>network.FetchTimingInfo </code> production, with all fields set to 0.
38583858
385938591. Let |timings| be |request|'s [=fetch timing info=].
38603860
@@ -3897,7 +3897,7 @@ To <dfn>get the fetch timings</div> given |request|:
389738971. Let |response end| be [=convert fetch timestamp=] given |timing|'s
38983898 <a spec=fetch>end time</a> and |global|.
38993899
3900- 1. Return a [=map=] matching the <code>NetworkFetchTimingInfo </code> production
3900+ 1. Return a [=map=] matching the <code>network.FetchTimingInfo </code> production
39013901 with the <code>requestTime</code> field set to |request time|, the
39023902 <code>redirectStart</code> field set to |redirect start|, the
39033903 <code>redirectEnd</code> field set to |redirect end|, the
@@ -3919,14 +3919,14 @@ TODO: Add service worker fields
39193919[=Remote end definition=] and [=local end definition=]
39203920
39213921<pre class="cddl local-cddl">
3922- NetworkHeader = {
3922+ network.Header = {
39233923 name: text,
39243924 ? value: text,
39253925 ? binaryValue: [ uint ]
39263926};
39273927</pre>
39283928
3929- The <code>Header</code> type represents a single request header.
3929+ The <code>network. Header</code> type represents a single request header.
39303930
39313931If the header value can be represented as a UTF-8 encoded string, the
39323932<code>value</code> field will be present. Otherwise the <code>binaryValue</code>
@@ -3954,7 +3954,7 @@ To <dfn>get a header</dfn> given |name bytes| and |value bytes|:
39543954 Otherwise: let |value| be |utf8 decoded value| and let |binary value|
39553955 be null.
39563956
3957- 1. Return a map matching the <code> NetworkHeader </code> production, with the
3957+ 1. Return a map matching the <code> network.Header </code> production, with the
39583958 <code> name</code> field set to |name|, the <code> value</code> field
39593959 set to |value| if it's not null, or omitted otherwise, and the
39603960 <code> binaryValue</code> field set to |binary value| if it's not null, or
@@ -3967,16 +3967,17 @@ To <dfn>get a header</dfn> given |name bytes| and |value bytes|:
39673967[=Remote end definition=] and [=local end definition=]
39683968
39693969<pre class="cddl local-cddl">
3970- NetworkInitiator = {
3970+ network.Initiator = {
39713971 type: "parser" / "script" / "preflight" / "other",
39723972 ?columnNumber: uint,
39733973 ?lineNumber: uint,
39743974 ?stackTrace: StackTrace,
3975- ?request: NetworkRequest
3975+ ?request: network.Request
39763976};
39773977</pre>
39783978
3979- The <code> Initiatior</code> type represents the source of a network request.
3979+ The <code> network.Initiatior</code> type represents the source of a network
3980+ request.
39803981
39813982<div algorithm>
39823983To <dfn>get the initiator</dfn> given |request|:
@@ -4006,7 +4007,7 @@ To <dfn>get the initiator</dfn> given |request|:
40064007 TODO: Chrome includes the current parser position as column number / line
40074008 number for parser-inserted resources.
40084009
4009- 1. Return a [=map=] matching the <code> NetworkInitiator </code> production, with
4010+ 1. Return a [=map=] matching the <code> network.Initiator </code> production, with
40104011 the |type| field set to "<code> type</code> ", the <code> columnNumber</code>
40114012 field set to |column number| if it's not null, or omitted otherwise, the
40124013 <code> lineNumber</code> field set to |line number| if it's not null, or
@@ -4020,7 +4021,7 @@ To <dfn>get the initiator</dfn> given |request|:
40204021[=Remote end definition=] and [=local end definition=]
40214022
40224023<pre class="cddl local-cddl remote-cddl">
4023- NetworkRequest = text;
4024+ network.Request = text;
40244025</pre>
40254026
40264027Each network request has an associated <dfn export>request id</dfn> , which is a
@@ -4032,19 +4033,19 @@ redirect matches that of the request that initiated it.
40324033[=Remote end definition=] and [=local end definition=]
40334034
40344035<pre class="cddl local-cddl">
4035- NetworkRequestData = {
4036- request: NetworkRequest ,
4036+ network.RequestData = {
4037+ request: network.Request ,
40374038 url: text,
40384039 method: text,
4039- headers: [ *NetworkHeader ] ,
4040- cookies: [ *NetworkCookie ] ,
4040+ headers: [*network.Header ] ,
4041+ cookies: [*network.Cookie ] ,
40414042 headersSize: uint,
40424043 bodySize: uint,
4043- timings: NetworkFetchTimingInfo ,
4044+ timings: network.FetchTimingInfo ,
40444045};
40454046</pre>
40464047
4047- The <code> RequestData</code> type represents an ongoing network request.
4048+ The <code> network. RequestData</code> type represents an ongoing network request.
40484049
40494050<div algorithm>
40504051
@@ -4094,7 +4095,7 @@ To <dfn>get the request data</dfn> given |request|:
40944095
409540961. Let |timings| be [=get the fetch timings=] with |request|.
40964097
4097- 1. Return a map matching the <code> NetworkRequestData </code> production, with
4098+ 1. Return a map matching the <code> network.RequestData </code> production, with
40984099 the <code> request</code> field set to |request id|, <code> url</code> field
40994100 set to |url|, the <code> method</code> field set to |method|, the
41004101 <code> headers</code> field set to |headers|, the |cookies| field set to
@@ -4109,21 +4110,21 @@ To <dfn>get the request data</dfn> given |request|:
41094110[=Remote end definition=] and [=local end definition=]
41104111
41114112<pre class="cddl local-cddl">
4112- NetworkResponseContent = {
4113+ network.ResponseContent = {
41134114 size: unit / null
41144115};
41154116</pre>
41164117
4117- The <code> ResponseContent</code> type represents the decoded response to a
4118- network request.
4118+ The <code> network. ResponseContent</code> type represents the decoded response to
4119+ a network request.
41194120
41204121<!-- Not sure this is worthwhile if it only ends up with a single field, but it
41214122would be natural to add a field here if we have a way to return the body -->
41224123
41234124<div algorithm>
41244125To <dfn>get the response content info</dfn> given |response|.
41254126
4126- 1. Return a new map matching the <code> NetworkResponseContent </code>
4127+ 1. Return a new map matching the <code> network.ResponseContent </code>
41274128 production, with the <code> size</code> field set to |response|'s [=response body
41284129 info=] 's [=decoded size=]
41294130
@@ -4134,21 +4135,22 @@ To <dfn>get the response content info</dfn> given |response|.
41344135[=Remote end definition=] and [=local end definition=]
41354136
41364137<pre class="cddl local-cddl">
4137- NetworkResponseData = {
4138+ network.ResponseData = {
41384139 url: text,
41394140 protocol: text,
41404141 status: uint,
41414142 statusText: text,
4142- headers: [ *NetworkHeader ] ,
4143+ headers: [*network.Header ] ,
41434144 mimeType: text,
41444145 bytesReceived: uint,
41454146 headersSize: uint / null,
41464147 bodySize: uint / null,
4147- content: NetworkResponseContent
4148+ content: network.ResponseContent
41484149};
41494150</pre>
41504151
4151- The <code> RequestData</code> type represents the response to a network request.
4152+ The <code> network.RequestData</code> type represents the response to a network
4153+ request.
41524154
41534155<div algorithm>
41544156To <dfn>get the response data</div> given |response|:
@@ -4180,7 +4182,7 @@ To <dfn>get the response data</div> given |response|:
41804182
418141831. Let |content| be |response|'s [=get the response content info=] with |response|.
41824184
4183- 1. Return a [=map=] matching the <code>NetworkResponseData </code> production,
4185+ 1. Return a [=map=] matching the <code>network.ResponseData </code> production,
41844186 with the <code>url</code> field set to |url|, the <code>protocol</code> field
41854187 set to |protocol|, the <code>status</code> field set to |status|, the
41864188 <code>statusText</code> field set to |status text|, the <code>headers</code>
@@ -4200,14 +4202,14 @@ To <dfn>get the response data</div> given |response|:
42004202 <dt>Event Type</dt>
42014203 <dd>
42024204 <pre class="cddl local-cddl">
4203- NetworkBeforeRequestSentEvent = {
4205+ network.BeforeRequestSent = {
42044206 method: "network.beforeRequestSent",
4205- params: NetworkBeforeRequestSentParams
4207+ params: network.BeforeRequestSentParameters
42064208 }
42074209
4208- NetworkBeforeRequestSentParams = {
4209- NetworkBaseEventParams ,
4210- initiator: NetworkInitiator
4210+ network.BeforeRequestSentParameters = {
4211+ network.BaseParameters ,
4212+ initiator: network.Initiator
42114213 }
42124214 </pre>
42134215 </dd>
@@ -4226,10 +4228,10 @@ request sent</dfn> steps given |request|:
42264228
422742291. Set the <code> initiatior</code> field of |params| to |initiator|.
42284230
4229- 1. Assert: |params| matches the <code> NetworkBeforeRequestSentParams </code>
4231+ 1. Assert: |params| matches the <code> network.BeforeRequestSentParameters </code>
42304232 production.
42314233
4232- 1. Let |body| be a map matching the <code> NetworkResponseStarted </code>
4234+ 1. Let |body| be a map matching the <code> network.ResponseStarted </code>
42334235 production, with the <code> params</code> field set to |params|.
42344236
423542371. [=Emit events=] with |body| and |related browsing contexts|.
@@ -4242,13 +4244,13 @@ request sent</dfn> steps given |request|:
42424244 <dt> Event Type</dt>
42434245 <dd>
42444246 <pre class="cddl local-cddl">
4245- NetworkFetchErrorEvent = {
4247+ network.FetchError = {
42464248 method: "network.fetchError",
4247- params: NetworkFetchErrorParams
4249+ params: network.FetchErrorParameters
42484250 }
42494251
4250- NetworkFetchErrorParams = {
4251- NetworkBaseEventParams ,
4252+ network.FetchErrorParameters = {
4253+ network.BaseParameters ,
42524254 errorText: text,
42534255 }
42544256 </pre>
@@ -4267,10 +4269,10 @@ error</dfn> steps given |request|:
42674269
426842701. TODO: Set the <code> errorText</code> field of |params|.
42694271
4270- 1. Assert: |params| matches the <code> NetworkFetchErrorParams </code>
4272+ 1. Assert: |params| matches the <code> network.FetchErrorParameters </code>
42714273 production.
42724274
4273- 1. Let |body| be a map matching the <code> NetworkFetchErrorEvent </code>
4275+ 1. Let |body| be a map matching the <code> network.FetchError </code>
42744276 production, with the <code> params</code> field set to |params|.
42754277
427642781. [=Emit events=] with |body| and |related browsing contexts|.
@@ -4283,14 +4285,14 @@ error</dfn> steps given |request|:
42834285 <dt> Event Type</dt>
42844286 <dd>
42854287 <pre class="cddl local-cddl">
4286- NetworkResponseCompletedEvent = {
4288+ network.ResponseCompleted = {
42874289 method: "network.responseCompleted",
4288- params: NetworkResponseCompletedParams
4290+ params: network.ResponseCompletedParameters
42894291 }
42904292
4291- NetworkResponseCompletedParams = {
4292- NetworkBaseEventParams ,
4293- response: NetworkResponseData ,
4293+ network.ResponseCompletedParameters = {
4294+ network.BaseParameters ,
4295+ response: network.ResponseData ,
42944296 }
42954297 </pre>
42964298 </dd>
@@ -4309,10 +4311,10 @@ completed</dfn> steps given |request| and |response|:
43094311
431043121. Set the <code> response</code> field of |params| to |response data|.
43114313
4312- 1. Assert: |params| matches the <code> NetworkResponseCompletedParams </code>
4314+ 1. Assert: |params| matches the <code> network.ResponseCompletedParameters </code>
43134315 production.
43144316
4315- 1. Let |body| be a map matching the <code> NetworkResponseCompleted </code>
4317+ 1. Let |body| be a map matching the <code> network.ResponseCompleted </code>
43164318 production, with the <code> params</code> field set to |params|.
43174319
431843201. [=Emit events=] with |body| and |related browsing contexts|.
@@ -4325,14 +4327,14 @@ completed</dfn> steps given |request| and |response|:
43254327 <dt> Event Type</dt>
43264328 <dd>
43274329 <pre class="cddl local-cddl">
4328- NetworkResponseStartedEvent = {
4329- method: "network.responseStartedEvent ",
4330- params: NetworkResponseStartedParams
4330+ network.ResponseStarted = {
4331+ method: "network.responseStarted ",
4332+ params: network.ResponseStartedParameters
43314333 }
43324334
4333- NetworkResponseStartedParams = {
4334- NetworkBaseEventParams ,
4335- response: NetworkResponseData ,
4335+ network.ResponseStartedParameters = {
4336+ network.BaseParameters ,
4337+ response: network.ResponseData ,
43364338 }
43374339 </pre>
43384340 </dd>
@@ -4352,10 +4354,10 @@ started</dfn> steps given |request| and |response|:
43524354
435343551. Set the <code> response</code> field of |params| to |response data|.
43544356
4355- 1. Assert: |params| matches the <code> NetworkResponseStartedParams </code>
4357+ 1. Assert: |params| matches the <code> network.ResponseStartedParameters </code>
43564358 production.
43574359
4358- 1. Let |body| be a map matching the <code> NetworkResponseStarted </code>
4360+ 1. Let |body| be a map matching the <code> network.ResponseStarted </code>
43594361 production, with the <code> params</code> field set to |params|.
43604362
436143631. [=Emit events=] with |body| and |related browsing contexts|.
0 commit comments