@@ -298,7 +298,7 @@ <h3 id="queue-report" algorithm>
298
298
Queue |data| as |type| for |destination|
299
299
</ h3 >
300
300
301
- To < dfn export for =" reporting " > queue </ dfn > a < a > report</ a > given a
301
+ To < dfn > generate a report</ dfn > given a
302
302
serializable object (|data|), a string (|type|), another string
303
303
(|destination|), an optional < a > environment settings object</ a >
304
304
(|settings|), and an optional {{URL}} (|url|):
@@ -328,14 +328,6 @@ <h3 id="queue-report" algorithm>
328
328
4. Set |report|'s [=report/url=] to the result of executing the < a > URL
329
329
serializer</ a > on |url| with the < em > exclude fragment flag</ em > set.
330
330
331
- 5. If |settings| is given, then
332
-
333
- 1. Let |scope| be |settings|'s [=environment settings object/global
334
- object=].
335
-
336
- 2. If |scope| is an object implementing {{WindowOrWorkerGlobalScope}},
337
- then execute [[#notify-observers]] with |scope| and |report|.
338
-
339
331
6. Return |report|.
340
332
341
333
Note: < a > reporting observers</ a > can only observe reports from the
@@ -494,16 +486,24 @@ <h3 id="report-generation">Report Generation</h3>
494
486
< h4 id ="generate-report " export algorithm > Generate report of |type| with
495
487
|data|</ h4 >
496
488
497
- When the user agent is to < dfn > generate a report</ dfn > for a < a > Document</ a >
489
+ When the user agent is to < dfn export > generate and queue a report</ dfn > for a < a > Document</ a >
498
490
or {{WorkerGlobalScope}} object (|context|), given a string (|type|), another
499
491
string (|destination|), and a serializable object (|data|), it must run the
500
492
following steps:
501
493
502
494
1. Let |settings| be |context|'s [=relevant settings object=].
503
495
504
- 2. Let |report| be the result of running [[#queue- report] ] with |data|,
496
+ 2. Let |report| be the result of running [=generate a report= ] with |data|,
505
497
|type|, |destination| and |settings|.
506
498
499
+ 1. If |settings| is given, then
500
+
501
+ 1. Let |scope| be |settings|'s [=environment settings object/global
502
+ object=].
503
+
504
+ 1. If |scope| is an object implementing {{WindowOrWorkerGlobalScope}},
505
+ then execute [[#notify-observers]] with |scope| and |report|.
506
+
507
507
3. Append |report| to |context|'s [=reports=].
508
508
509
509
< h3 id ="report-delivery "> Report Delivery</ h3 >
@@ -948,7 +948,7 @@ <h2 id="automation">Automation</h2>
948
948
949
949
< h3 id ="generate-test-report-command "> Generate Test Report</ h3 >
950
950
951
- The < dfn > Generate Test Report</ dfn > < a > extension command</ a > simulates the
951
+ The < dfn export > Generate Test Report</ dfn > < a > extension command</ a > simulates the
952
952
generation of a < a > report</ a > for the purposes of testing. This report will be
953
953
observed by any < a > registered</ a > < a > reporting observers</ a > .
954
954
@@ -1003,7 +1003,7 @@ <h3 id="generate-test-report-command">Generate Test Report</h3>
1003
1003
9. Let |settings| be the < a > environment settings object</ a > of the
1004
1004
< a > current browsing context</ a > 's < a > active document</ a > .
1005
1005
1006
- 10. Execute [[# queue- report] ] with |body|, "test", |group|, and |settings|.
1006
+ 10. Execute [=generate and queue a report= ] with |body|, "test", |group|, and |settings|.
1007
1007
1008
1008
11. Return < a > success</ a > with data null.
1009
1009
</ section >
0 commit comments