@@ -5258,7 +5258,7 @@ To <dfn>deserialize header</dfn> given |protocol header|:
52585258
52595259<pre class="cddl local-cddl">
52605260network.Initiator = {
5261- type: text ,
5261+ type: "parser" / "script" / "preflight" / "other" ,
52625262 ? columnNumber: js-uint,
52635263 ? lineNumber: js-uint,
52645264 ? url: text,
@@ -5272,32 +5272,34 @@ request.
52725272<div algorithm>
52735273To <dfn>get the initiator</dfn> given |request|:
52745274
5275- 1. Let |type| be |request|'s [=request/initiator type=] .
5275+ 1. Let |type| be " <code> other </code> " .
52765276
5277- 1. If |request|'s [=request/initiator type=] is " <code> fetch </code> " or
5278- "<code> xmlhttprequest </code> ":
5277+ 1. If |request| is a [=CORS-Preflight Request=] , set |type| to
5278+ "<code> preflight </code> ".
52795279
5280- 1. Let |stack trace| be the [=current stack trace=] .
5280+ 1. Otherwise, if |requests|'s [=parser metadata=] is "<code> not-parser-inserted</code> ",
5281+ set |type| to "<code> script</code> ".
52815282
5282- 1. If |stack trace| has size of 1 or greater:
5283+ 1. Otherwise, if |requests|'s [=parser metadata=] is "<code> parser-inserted</code> ",
5284+ set |type| to "<code> parser</code> ".
52835285
5284- 1. Let |url| be value of the <code> url </code> in |stack trace| [0] .
5286+ 1. If |type| is " <code> script </code> ":
52855287
5286- 1. Let |line number| be value of the <code> lineNumber</code> field in
5287- |stack trace|[0] .
5288+ 1. Let |stack trace| be the [=current stack trace=] .
52885289
5289- 1. Let |column number| be the value of the <code> columnNumber</code>
5290- field in |stack trace|[0] .
5290+ 1. Let |url| be value of the <code> url</code> in |stack trace|[0] .
52915291
5292- 1. Otherwise:
5292+ 1. Let |line number| be value of the <code> lineNumber</code> field in
5293+ |stack trace|[0] .
52935294
5294- 1. Let |stack trace| be null.
5295+ 1. Let |column number| be the value of the <code> columnNumber</code>
5296+ field in |stack trace|[0] .
52955297
5296- 1. Let |url| be the URL of the [=resource=] that initiated |request|.
5298+ 1. Otherwise, if |type| is " <code> parser </code> ":
52975299
5298- 1. Let |column number| be the column number within the [=resource=] that initiated |request| .
5300+ 1. TODO: set url/line/ column based on the parser positions .
52995301
5300- 1. Let |line number| be the line number within the [=resource=] that initiated |request| .
5302+ 1. Otherwise, let |stack trace|, |column number|, and | line number| all be null .
53015303
530253041. Return a [=/map=] matching the <code> network.Initiator</code>
53035305 production, with the <code> type</code> field set to |type|, the
0 commit comments