@@ -5236,7 +5236,7 @@ To <dfn>deserialize header</dfn> given |protocol header|:
5236
5236
5237
5237
<pre class="cddl local-cddl">
5238
5238
network.Initiator = {
5239
- type: text ,
5239
+ type: "parser" / "script" / "preflight" / "other" ,
5240
5240
? columnNumber: js-uint,
5241
5241
? lineNumber: js-uint,
5242
5242
? url: text,
@@ -5250,32 +5250,34 @@ request.
5250
5250
<div algorithm>
5251
5251
To <dfn>get the initiator</dfn> given |request|:
5252
5252
5253
- 1. Let |type| be |request|'s [=request/initiator type=] .
5253
+ 1. Let |type| be " <code> other </code> " .
5254
5254
5255
- 1. If |request|'s [=request/initiator type=] is " <code> fetch </code> " or
5256
- "<code> xmlhttprequest </code> ":
5255
+ 1. If |request| is a [=CORS-Preflight Request=] , set |type| to
5256
+ "<code> preflight </code> ".
5257
5257
5258
- 1. Let |stack trace| be the [=current stack trace=] .
5258
+ 1. Otherwise, if |requests|'s [=parser metadata=] is "<code> not-parser-inserted</code> ",
5259
+ set |type| to "<code> script</code> ".
5259
5260
5260
- 1. If |stack trace| has size of 1 or greater:
5261
+ 1. Otherwise, if |requests|'s [=parser metadata=] is "<code> parser-inserted</code> ",
5262
+ set |type| to "<code> parser</code> ".
5261
5263
5262
- 1. Let |url| be value of the <code> url </code> in |stack trace| [0] .
5264
+ 1. If |type| is " <code> script </code> ":
5263
5265
5264
- 1. Let |line number| be value of the <code> lineNumber</code> field in
5265
- |stack trace|[0] .
5266
+ 1. Let |stack trace| be the [=current stack trace=] .
5266
5267
5267
- 1. Let |column number| be the value of the <code> columnNumber</code>
5268
- field in |stack trace|[0] .
5268
+ 1. Let |url| be value of the <code> url</code> in |stack trace|[0] .
5269
5269
5270
- 1. Otherwise:
5270
+ 1. Let |line number| be value of the <code> lineNumber</code> field in
5271
+ |stack trace|[0] .
5271
5272
5272
- 1. Let |stack trace| be null.
5273
+ 1. Let |column number| be the value of the <code> columnNumber</code>
5274
+ field in |stack trace|[0] .
5273
5275
5274
- 1. Let |url| be the URL of the [=resource=] that initiated |request|.
5276
+ 1. Otherwise, if |type| is " <code> parser </code> ":
5275
5277
5276
- 1. Let |column number| be the column number within the [=resource=] that initiated |request| .
5278
+ 1. TODO: set url/line/ column based on the parser positions .
5277
5279
5278
- 1. Let |line number| be the line number within the [=resource=] that initiated |request| .
5280
+ 1. Otherwise, let |stack trace|, |column number|, and | line number| all be null .
5279
5281
5280
5282
1. Return a [=/map=] matching the <code> network.Initiator</code>
5281
5283
production, with the <code> type</code> field set to |type|, the
0 commit comments