Re: [whatwg/fetch] Allow timing reporting with origin (for iframes) (PR #1388)

@annevk commented on this pull request.



> @@ -6008,14 +6033,24 @@ agent's <a>CORS-preflight cache</a> for which there is a <a>cache entry match</a
  <li><p>If <var>request</var>'s <a for=request>response tainting</a> is "<code>basic</code>", then
  return success.
 
+ <li><p>Let <var>origin</var> be the result of <a>serializing a request origin</a> with
+ <var>request</var>.
+
+ <li><p>Return the result of calling <a>TAO origin check</a> with <var>response</var> and
+ <var>origin</var>.
+</ol>
+
+<p>To perform a <dfn id=concept-tao-origin-check>TAO origin check</dfn> for a <a for=/>response</a>
+<var>response</var> and an <a for=/>ASCII string</a> <var>origin</var> and, run these steps:

spurious "and"

> + <li>Set <var>response</var>'s <a for="response">timing info</a> to the
+ result of calling <a>report timing</a> given <var>response</var>, <var>global</var>,
+ <var>initiatorType</var>, and <var>taoPass</var>.
+</ol>
+
+<p>To <dfn export>report timing with origin</dfn> given a <a for=/>response</a>
+<var>response</var>, a <a for=/>global object</a> <var>global</var>, an <a for=/>origin</a>
+<var>origin</var>, and a <a for=/>string</a> <var>initiatorType</var> (default
+"<code>other</code>"), <a>report timing</a> for <var>response</var>,
+<var>global</var>, <var>initiatorType</var>, and the result of calling <a>TAO origin check</a> with
+<var>response</var> and the result of <a lt="ASCII serialization of an origin">serializing</a>
+<var>origin</var>.
+
+<p class=note>This algorithm is used by <cite>HTML</cite> to report resource timing for
+iframes, as iframes report both to the iframe's loaded document as navigation timing and to the
+containing document as resource timing.

This needs [[HTML]] or some such at the end. It should also use more formal language to describe these concepts. Perhaps "report resource timing documents nested through `iframe` elements"?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1388#pullrequestreview-881333092
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1388/review/881333092@github.com>

Received on Monday, 14 February 2022 09:08:48 UTC