Skip to content

Commit 4e5d051

Browse files
authored
Add response status code to PerfomanceResourceTiming (#335)
* Response status field behind CORS check * Add note mentioning opaque filtered response * Update index.html * Amend note
1 parent 958ccdd commit 4e5d051

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

‎index.html

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ <h3>
371371
readonly attribute unsigned long long transferSize;
372372
readonly attribute unsigned long long encodedBodySize;
373373
readonly attribute unsigned long long decodedBodySize;
374+
readonly attribute unsigned short responseStatus;
374375
readonly attribute RenderBlockingStatusType renderBlockingStatus;
375376
[Default] object toJSON();
376377
};
@@ -401,6 +402,11 @@ <h3>
401402
info=] <a data-dfn-for="PerformanceResourceTiming"><dfn>resource
402403
info</dfn></a>.
403404
</p>
405+
<p>
406+
A <a>PerformanceResourceTiming</a> has an associated
407+
<a data-cite="FETCH#concept-status">status</a> <a data-dfn-for=
408+
"PerformanceResourceTiming"><dfn>response status</dfn></a>.
409+
</p>
404410
<p>
405411
A <a>PerformanceResourceTiming</a> has an associated
406412
{{RenderBlockingStatusType}} <a data-dfn-for=
@@ -701,6 +707,16 @@ <h3>
701707
</p>
702708
</li>
703709
</ol>
710+
<p data-dfn-for="PerformanceResourceTiming">
711+
The <dfn>responseStatus</dfn> getter steps are to return
712+
<a>this</a>'s <a data-for="PerformanceResourceTiming">response status</a>.
713+
</p>
714+
<p class='note'>
715+
`responseStatus` is determined in [=Fetch=]. For a cross-origin
716+
<a data-cite="FETCH#dom-requestmode-no-cors">no-cors</a> request it
717+
would be 0 because the response would be an <a data-cite=
718+
"FETCH#concept-filtered-response-opaque">opaque filtered response</a>.
719+
</p>
704720
<p data-dfn-for="PerformanceResourceTiming">
705721
The <dfn>renderBlockingStatus</dfn> getter steps are to return
706722
<a data-link-for="RenderBlockingStatusType">blocking</a> if
@@ -1107,17 +1123,18 @@ <h2>
11071123
To <dfn data-export="">mark resource timing</dfn> given a [=/fetch
11081124
timing info=] |timingInfo|, a DOMString |requestedURL|, a DOMString
11091125
|initiatorType| a <a>global object</a> |global|, a string
1110-
|cacheMode|, and a [=/response body info=] |bodyInfo|, perform the
1111-
following steps:
1126+
|cacheMode|, a [=/response body info=] |bodyInfo|, and a
1127+
<a data-cite="FETCH#concept-status">status</a> |responseStatus|,
1128+
perform the following steps:
11121129
</p>
11131130
<ol>
11141131
<li>Create a <a>PerformanceResourceTiming</a> object |entry| in
11151132
|global|'s [=global object/realm=].
11161133
</li>
11171134
<li>
11181135
<a>Setup the resource timing entry</a> for |entry|, given
1119-
|initiatorType|, |requestedURL|, |timingInfo|, |cacheMode|, and
1120-
|bodyInfo|.
1136+
|initiatorType|, |requestedURL|, |timingInfo|, |cacheMode|,
1137+
|bodyInfo| and |responseStatus|.
11211138
</li>
11221139
<li>
11231140
<a data-cite=
@@ -1134,8 +1151,9 @@ <h2>
11341151
To <dfn data-export="">setup the resource timing entry</dfn> for
11351152
<a>PerformanceResourceTiming</a> |entry| given DOMString
11361153
|initiatorType|, DOMString |requestedURL|, [=/fetch timing info=]
1137-
|timingInfo|, a DOMString |cacheMode|, and a [=response body info=]
1138-
|bodyInfo|, perform the following steps:
1154+
|timingInfo|, a DOMString |cacheMode|, a [=response body info=]
1155+
|bodyInfo|, and a <a data-cite="FETCH#concept-status">status</a>
1156+
|responseStatus|, perform the following steps:
11391157
</p>
11401158
<ol>
11411159
<li>Assert that |cacheMode| is the empty string,
@@ -1156,6 +1174,9 @@ <h2>
11561174
<li>Set |entry|'s <a data-for="PerformanceResourceTiming">cache
11571175
mode</a> to |cacheMode|.
11581176
</li>
1177+
<li>Set |entry|'s <a data-for="PerformanceResourceTiming">response
1178+
status</a> to |responseStatus|.
1179+
</li>
11591180
</ol>
11601181
<p>
11611182
To <dfn>convert fetch timestamp</dfn> given {{DOMHighResTimeStamp}}

0 commit comments

Comments
 (0)