@@ -5258,7 +5258,7 @@ To <dfn>deserialize header</dfn> given |protocol header|:
5258
5258
5259
5259
<pre class="cddl local-cddl">
5260
5260
network.Initiator = {
5261
- type: text ,
5261
+ type: "parser" / "script" / "preflight" / "other" ,
5262
5262
? columnNumber: js-uint,
5263
5263
? lineNumber: js-uint,
5264
5264
? url: text,
@@ -5272,32 +5272,34 @@ request.
5272
5272
<div algorithm>
5273
5273
To <dfn>get the initiator</dfn> given |request|:
5274
5274
5275
- 1. Let |type| be |request|'s [=request/initiator type=] .
5275
+ 1. Let |type| be " <code> other </code> " .
5276
5276
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> ".
5279
5279
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> ".
5281
5282
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> ".
5283
5285
5284
- 1. Let |url| be value of the <code> url </code> in |stack trace| [0] .
5286
+ 1. If |type| is " <code> script </code> ":
5285
5287
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=] .
5288
5289
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] .
5291
5291
5292
- 1. Otherwise:
5292
+ 1. Let |line number| be value of the <code> lineNumber</code> field in
5293
+ |stack trace|[0] .
5293
5294
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] .
5295
5297
5296
- 1. Let |url| be the URL of the [=resource=] that initiated |request|.
5298
+ 1. Otherwise, if |type| is " <code> parser </code> ":
5297
5299
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 .
5299
5301
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 .
5301
5303
5302
5304
1. Return a [=/map=] matching the <code> network.Initiator</code>
5303
5305
production, with the <code> type</code> field set to |type|, the
0 commit comments