Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add response status code to PerfomanceResourceTiming #335

Merged
merged 6 commits into from
Oct 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ <h3>
readonly attribute unsigned long long transferSize;
readonly attribute unsigned long long encodedBodySize;
readonly attribute unsigned long long decodedBodySize;
readonly attribute unsigned short responseStatus;
readonly attribute RenderBlockingStatusType renderBlockingStatus;
[Default] object toJSON();
};
Expand Down Expand Up @@ -401,6 +402,11 @@ <h3>
info=] <a data-dfn-for="PerformanceResourceTiming"><dfn>resource
info</dfn></a>.
</p>
<p>
A <a>PerformanceResourceTiming</a> has an associated
<a data-cite="FETCH#concept-status">status</a> <a data-dfn-for=
"PerformanceResourceTiming"><dfn>response status</dfn></a>.
</p>
<p>
A <a>PerformanceResourceTiming</a> has an associated
{{RenderBlockingStatusType}} <a data-dfn-for=
Expand Down Expand Up @@ -701,6 +707,16 @@ <h3>
</p>
</li>
</ol>
<p data-dfn-for="PerformanceResourceTiming">
The <dfn>responseStatus</dfn> getter steps are to return
<a>this</a>'s <a data-for="PerformanceResourceTiming">response status</a>.
</p>
<p class='note'>
`responseStatus` is determined in [=Fetch=]. For a cross-origin
<a data-cite="FETCH#dom-requestmode-no-cors">no-cors</a> request it
would be 0 because the response would be an <a data-cite=
"FETCH#concept-filtered-response-opaque">opaque filtered response</a>.
</p>
<p data-dfn-for="PerformanceResourceTiming">
The <dfn>renderBlockingStatus</dfn> getter steps are to return
<a data-link-for="RenderBlockingStatusType">blocking</a> if
Expand Down Expand Up @@ -1107,17 +1123,18 @@ <h2>
To <dfn data-export="">mark resource timing</dfn> given a [=/fetch
timing info=] |timingInfo|, a DOMString |requestedURL|, a DOMString
|initiatorType| a <a>global object</a> |global|, a string
|cacheMode|, and a [=/response body info=] |bodyInfo|, perform the
following steps:
|cacheMode|, a [=/response body info=] |bodyInfo|, and a
<a data-cite="FETCH#concept-status">status</a> |responseStatus|,
perform the following steps:
</p>
<ol>
<li>Create a <a>PerformanceResourceTiming</a> object |entry| in
|global|'s [=global object/realm=].
</li>
<li>
<a>Setup the resource timing entry</a> for |entry|, given
|initiatorType|, |requestedURL|, |timingInfo|, |cacheMode|, and
|bodyInfo|.
|initiatorType|, |requestedURL|, |timingInfo|, |cacheMode|,
|bodyInfo| and |responseStatus|.
</li>
<li>
<a data-cite=
Expand All @@ -1134,8 +1151,9 @@ <h2>
To <dfn data-export="">setup the resource timing entry</dfn> for
<a>PerformanceResourceTiming</a> |entry| given DOMString
|initiatorType|, DOMString |requestedURL|, [=/fetch timing info=]
|timingInfo|, a DOMString |cacheMode|, and a [=response body info=]
|bodyInfo|, perform the following steps:
|timingInfo|, a DOMString |cacheMode|, a [=response body info=]
|bodyInfo|, and a <a data-cite="FETCH#concept-status">status</a>
|responseStatus|, perform the following steps:
</p>
<ol>
<li>Assert that |cacheMode| is the empty string,
Expand All @@ -1156,6 +1174,9 @@ <h2>
<li>Set |entry|'s <a data-for="PerformanceResourceTiming">cache
mode</a> to |cacheMode|.
</li>
<li>Set |entry|'s <a data-for="PerformanceResourceTiming">response
status</a> to |responseStatus|.
</li>
</ol>
<p>
To <dfn>convert fetch timestamp</dfn> given {{DOMHighResTimeStamp}}
Expand Down