@@ -3738,10 +3738,10 @@ NetworkResult = (
3738
3738
)
3739
3739
3740
3740
NetworkEvent = (
3741
- NetworkBeforeRequestSentEvent //
3742
- NetworkResponseStartedEvent //
3743
- NetworkResponseCompletedEvent //
3744
- NetworkFetchErrorEvent
3741
+ network.BeforeRequestSent //
3742
+ network.ResponseStarted //
3743
+ network.ResponseCompleted //
3744
+ network.FetchError
3745
3745
)
3746
3746
3747
3747
</pre>
@@ -3751,16 +3751,16 @@ NetworkEvent = (
3751
3751
#### The network.BaseEventParams type #### {#type-network-BasEventParams}
3752
3752
3753
3753
<pre class="cddl local-cddl">
3754
- NetworkBaseEventParams = {
3755
- request: NetworkRequestData ,
3754
+ network.BaseParameters = {
3755
+ request: network.RequestData ,
3756
3756
navigation: Navigation / null,
3757
3757
context: BrowsingContext / null,
3758
3758
timestamp: int
3759
3759
}
3760
3760
</pre>
3761
3761
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.
3764
3764
3765
3765
<div algorithm>
3766
3766
To <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|:
3786
3786
3787
3787
1. Let |timestamp| be a [=time value=] representing the current date and time in UTC.
3788
3788
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
3790
3790
the <code> request</code> field set to |request data|, the |navigation| field
3791
3791
set to <code> navigation</code> , the <code> context</code> field set to
3792
3792
|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|:
3800
3800
[=Remote end definition=] and [=local end definition=]
3801
3801
3802
3802
<pre class="cddl local-cddl">
3803
- NetworkCookie = {
3803
+ network.Cookie = {
3804
3804
name: text,
3805
3805
? value: text,
3806
3806
? binaryValue: [ uint ]
@@ -3815,7 +3815,7 @@ NetworkCookie = {
3815
3815
};
3816
3816
</pre>
3817
3817
3818
- The <code> Cookie</code> type represents a cookie.
3818
+ The <code> network. Cookie</code> type represents a cookie.
3819
3819
3820
3820
If the cookie value can be represented as a UTF-8 encoded string, the
3821
3821
<code> value</code> field will be present. Otherwise the <code> binaryValue</code>
@@ -3827,7 +3827,7 @@ of the cookie value.
3827
3827
[=Remote end definition=] and [=local end definition=]
3828
3828
3829
3829
<pre class="cddl local-cddl">
3830
- NetworkFetchTimingInfo = {
3830
+ network.FetchTimingInfo = {
3831
3831
requestTime: float,
3832
3832
redirectStart: float,
3833
3833
redirectEnd: float,
@@ -3845,7 +3845,7 @@ NetworkFetchTimingInfo = {
3845
3845
};
3846
3846
</pre>
3847
3847
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
3849
3849
the request, relative to <code> requestTime</code> .
3850
3850
3851
3851
<div algorithm>
@@ -3854,7 +3854,7 @@ To <dfn>get the fetch timings</div> given |request|:
3854
3854
1. Let |global| be |request|'s [=request/client=].
3855
3855
3856
3856
1. 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.
3858
3858
3859
3859
1. Let |timings| be |request|'s [=fetch timing info=].
3860
3860
@@ -3897,7 +3897,7 @@ To <dfn>get the fetch timings</div> given |request|:
3897
3897
1. Let |response end| be [=convert fetch timestamp=] given |timing|'s
3898
3898
<a spec=fetch>end time</a> and |global|.
3899
3899
3900
- 1. Return a [=map=] matching the <code>NetworkFetchTimingInfo </code> production
3900
+ 1. Return a [=map=] matching the <code>network.FetchTimingInfo </code> production
3901
3901
with the <code>requestTime</code> field set to |request time|, the
3902
3902
<code>redirectStart</code> field set to |redirect start|, the
3903
3903
<code>redirectEnd</code> field set to |redirect end|, the
@@ -3919,14 +3919,14 @@ TODO: Add service worker fields
3919
3919
[=Remote end definition=] and [=local end definition=]
3920
3920
3921
3921
<pre class="cddl local-cddl">
3922
- NetworkHeader = {
3922
+ network.Header = {
3923
3923
name: text,
3924
3924
? value: text,
3925
3925
? binaryValue: [ uint ]
3926
3926
};
3927
3927
</pre>
3928
3928
3929
- The <code>Header</code> type represents a single request header.
3929
+ The <code>network. Header</code> type represents a single request header.
3930
3930
3931
3931
If the header value can be represented as a UTF-8 encoded string, the
3932
3932
<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|:
3954
3954
Otherwise: let |value| be |utf8 decoded value| and let |binary value|
3955
3955
be null.
3956
3956
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
3958
3958
<code> name</code> field set to |name|, the <code> value</code> field
3959
3959
set to |value| if it's not null, or omitted otherwise, and the
3960
3960
<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|:
3967
3967
[=Remote end definition=] and [=local end definition=]
3968
3968
3969
3969
<pre class="cddl local-cddl">
3970
- NetworkInitiator = {
3970
+ network.Initiator = {
3971
3971
type: "parser" / "script" / "preflight" / "other",
3972
3972
?columnNumber: uint,
3973
3973
?lineNumber: uint,
3974
3974
?stackTrace: StackTrace,
3975
- ?request: NetworkRequest
3975
+ ?request: network.Request
3976
3976
};
3977
3977
</pre>
3978
3978
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.
3980
3981
3981
3982
<div algorithm>
3982
3983
To <dfn>get the initiator</dfn> given |request|:
@@ -4006,7 +4007,7 @@ To <dfn>get the initiator</dfn> given |request|:
4006
4007
TODO: Chrome includes the current parser position as column number / line
4007
4008
number for parser-inserted resources.
4008
4009
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
4010
4011
the |type| field set to "<code> type</code> ", the <code> columnNumber</code>
4011
4012
field set to |column number| if it's not null, or omitted otherwise, the
4012
4013
<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|:
4020
4021
[=Remote end definition=] and [=local end definition=]
4021
4022
4022
4023
<pre class="cddl local-cddl remote-cddl">
4023
- NetworkRequest = text;
4024
+ network.Request = text;
4024
4025
</pre>
4025
4026
4026
4027
Each 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.
4032
4033
[=Remote end definition=] and [=local end definition=]
4033
4034
4034
4035
<pre class="cddl local-cddl">
4035
- NetworkRequestData = {
4036
- request: NetworkRequest ,
4036
+ network.RequestData = {
4037
+ request: network.Request ,
4037
4038
url: text,
4038
4039
method: text,
4039
- headers: [ *NetworkHeader ] ,
4040
- cookies: [ *NetworkCookie ] ,
4040
+ headers: [*network.Header ] ,
4041
+ cookies: [*network.Cookie ] ,
4041
4042
headersSize: uint,
4042
4043
bodySize: uint,
4043
- timings: NetworkFetchTimingInfo ,
4044
+ timings: network.FetchTimingInfo ,
4044
4045
};
4045
4046
</pre>
4046
4047
4047
- The <code> RequestData</code> type represents an ongoing network request.
4048
+ The <code> network. RequestData</code> type represents an ongoing network request.
4048
4049
4049
4050
<div algorithm>
4050
4051
@@ -4094,7 +4095,7 @@ To <dfn>get the request data</dfn> given |request|:
4094
4095
4095
4096
1. Let |timings| be [=get the fetch timings=] with |request|.
4096
4097
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
4098
4099
the <code> request</code> field set to |request id|, <code> url</code> field
4099
4100
set to |url|, the <code> method</code> field set to |method|, the
4100
4101
<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|:
4109
4110
[=Remote end definition=] and [=local end definition=]
4110
4111
4111
4112
<pre class="cddl local-cddl">
4112
- NetworkResponseContent = {
4113
+ network.ResponseContent = {
4113
4114
size: unit / null
4114
4115
};
4115
4116
</pre>
4116
4117
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.
4119
4120
4120
4121
<!-- Not sure this is worthwhile if it only ends up with a single field, but it
4121
4122
would be natural to add a field here if we have a way to return the body -->
4122
4123
4123
4124
<div algorithm>
4124
4125
To <dfn>get the response content info</dfn> given |response|.
4125
4126
4126
- 1. Return a new map matching the <code> NetworkResponseContent </code>
4127
+ 1. Return a new map matching the <code> network.ResponseContent </code>
4127
4128
production, with the <code> size</code> field set to |response|'s [=response body
4128
4129
info=] 's [=decoded size=]
4129
4130
@@ -4134,21 +4135,22 @@ To <dfn>get the response content info</dfn> given |response|.
4134
4135
[=Remote end definition=] and [=local end definition=]
4135
4136
4136
4137
<pre class="cddl local-cddl">
4137
- NetworkResponseData = {
4138
+ network.ResponseData = {
4138
4139
url: text,
4139
4140
protocol: text,
4140
4141
status: uint,
4141
4142
statusText: text,
4142
- headers: [ *NetworkHeader ] ,
4143
+ headers: [*network.Header ] ,
4143
4144
mimeType: text,
4144
4145
bytesReceived: uint,
4145
4146
headersSize: uint / null,
4146
4147
bodySize: uint / null,
4147
- content: NetworkResponseContent
4148
+ content: network.ResponseContent
4148
4149
};
4149
4150
</pre>
4150
4151
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.
4152
4154
4153
4155
<div algorithm>
4154
4156
To <dfn>get the response data</div> given |response|:
@@ -4180,7 +4182,7 @@ To <dfn>get the response data</div> given |response|:
4180
4182
4181
4183
1. Let |content| be |response|'s [=get the response content info=] with |response|.
4182
4184
4183
- 1. Return a [=map=] matching the <code>NetworkResponseData </code> production,
4185
+ 1. Return a [=map=] matching the <code>network.ResponseData </code> production,
4184
4186
with the <code>url</code> field set to |url|, the <code>protocol</code> field
4185
4187
set to |protocol|, the <code>status</code> field set to |status|, the
4186
4188
<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|:
4200
4202
<dt>Event Type</dt>
4201
4203
<dd>
4202
4204
<pre class="cddl local-cddl">
4203
- NetworkBeforeRequestSentEvent = {
4205
+ network.BeforeRequestSent = {
4204
4206
method: "network.beforeRequestSent",
4205
- params: NetworkBeforeRequestSentParams
4207
+ params: network.BeforeRequestSentParameters
4206
4208
}
4207
4209
4208
- NetworkBeforeRequestSentParams = {
4209
- NetworkBaseEventParams ,
4210
- initiator: NetworkInitiator
4210
+ network.BeforeRequestSentParameters = {
4211
+ network.BaseParameters ,
4212
+ initiator: network.Initiator
4211
4213
}
4212
4214
</pre>
4213
4215
</dd>
@@ -4226,10 +4228,10 @@ request sent</dfn> steps given |request|:
4226
4228
4227
4229
1. Set the <code> initiatior</code> field of |params| to |initiator|.
4228
4230
4229
- 1. Assert: |params| matches the <code> NetworkBeforeRequestSentParams </code>
4231
+ 1. Assert: |params| matches the <code> network.BeforeRequestSentParameters </code>
4230
4232
production.
4231
4233
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>
4233
4235
production, with the <code> params</code> field set to |params|.
4234
4236
4235
4237
1. [=Emit events=] with |body| and |related browsing contexts|.
@@ -4242,13 +4244,13 @@ request sent</dfn> steps given |request|:
4242
4244
<dt> Event Type</dt>
4243
4245
<dd>
4244
4246
<pre class="cddl local-cddl">
4245
- NetworkFetchErrorEvent = {
4247
+ network.FetchError = {
4246
4248
method: "network.fetchError",
4247
- params: NetworkFetchErrorParams
4249
+ params: network.FetchErrorParameters
4248
4250
}
4249
4251
4250
- NetworkFetchErrorParams = {
4251
- NetworkBaseEventParams ,
4252
+ network.FetchErrorParameters = {
4253
+ network.BaseParameters ,
4252
4254
errorText: text,
4253
4255
}
4254
4256
</pre>
@@ -4267,10 +4269,10 @@ error</dfn> steps given |request|:
4267
4269
4268
4270
1. TODO: Set the <code> errorText</code> field of |params|.
4269
4271
4270
- 1. Assert: |params| matches the <code> NetworkFetchErrorParams </code>
4272
+ 1. Assert: |params| matches the <code> network.FetchErrorParameters </code>
4271
4273
production.
4272
4274
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>
4274
4276
production, with the <code> params</code> field set to |params|.
4275
4277
4276
4278
1. [=Emit events=] with |body| and |related browsing contexts|.
@@ -4283,14 +4285,14 @@ error</dfn> steps given |request|:
4283
4285
<dt> Event Type</dt>
4284
4286
<dd>
4285
4287
<pre class="cddl local-cddl">
4286
- NetworkResponseCompletedEvent = {
4288
+ network.ResponseCompleted = {
4287
4289
method: "network.responseCompleted",
4288
- params: NetworkResponseCompletedParams
4290
+ params: network.ResponseCompletedParameters
4289
4291
}
4290
4292
4291
- NetworkResponseCompletedParams = {
4292
- NetworkBaseEventParams ,
4293
- response: NetworkResponseData ,
4293
+ network.ResponseCompletedParameters = {
4294
+ network.BaseParameters ,
4295
+ response: network.ResponseData ,
4294
4296
}
4295
4297
</pre>
4296
4298
</dd>
@@ -4309,10 +4311,10 @@ completed</dfn> steps given |request| and |response|:
4309
4311
4310
4312
1. Set the <code> response</code> field of |params| to |response data|.
4311
4313
4312
- 1. Assert: |params| matches the <code> NetworkResponseCompletedParams </code>
4314
+ 1. Assert: |params| matches the <code> network.ResponseCompletedParameters </code>
4313
4315
production.
4314
4316
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>
4316
4318
production, with the <code> params</code> field set to |params|.
4317
4319
4318
4320
1. [=Emit events=] with |body| and |related browsing contexts|.
@@ -4325,14 +4327,14 @@ completed</dfn> steps given |request| and |response|:
4325
4327
<dt> Event Type</dt>
4326
4328
<dd>
4327
4329
<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
4331
4333
}
4332
4334
4333
- NetworkResponseStartedParams = {
4334
- NetworkBaseEventParams ,
4335
- response: NetworkResponseData ,
4335
+ network.ResponseStartedParameters = {
4336
+ network.BaseParameters ,
4337
+ response: network.ResponseData ,
4336
4338
}
4337
4339
</pre>
4338
4340
</dd>
@@ -4352,10 +4354,10 @@ started</dfn> steps given |request| and |response|:
4352
4354
4353
4355
1. Set the <code> response</code> field of |params| to |response data|.
4354
4356
4355
- 1. Assert: |params| matches the <code> NetworkResponseStartedParams </code>
4357
+ 1. Assert: |params| matches the <code> network.ResponseStartedParameters </code>
4356
4358
production.
4357
4359
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>
4359
4361
production, with the <code> params</code> field set to |params|.
4360
4362
4361
4363
1. [=Emit events=] with |body| and |related browsing contexts|.
0 commit comments