@@ -129,6 +129,9 @@ <h1>Reporting API</h1>
129
129
text: session; url: dfn-session
130
130
text: success; url: dfn-success
131
131
text: trying; url: dfn-try
132
+ spec: netinfo; urlPrefix: https://wicg.github.io/netinfo
133
+ type: dfn
134
+ text: saveData; url: savedata-attribute
132
135
</ pre >
133
136
< pre class ="biblio ">
134
137
{
@@ -651,15 +654,8 @@ <h3 id="queue-report" algorithm>
651
654
(|endpoint group|), an < a > environment settings object</ a > (|settings|), and an
652
655
optional {{URL}} (|url|), the following algorithm will create a < a > report</ a > ,
653
656
and add it to < a > reporting cache</ a > 's queue for future delivery.
654
-
655
- 1. If |settings|'s < a > report count</ a > contains an entry
656
- with < a spec =infra > key</ a > |type|, then increment that entry. Otherwise,
657
- create an entry in |settings|'s < a > report count</ a >
658
- with < a spec =infra > key</ a > |type| and < a spec =infra > value</ a > 1.
659
-
660
- 2. If |settings|'s < a > report count</ a > [|type|] is greater than 100, return.
661
657
662
- 3 . Let |report| be a new < a > report</ a > object with its values initialized as
658
+ 1 . Let |report| be a new < a > report</ a > object with its values initialized as
663
659
follows:
664
660
665
661
: [=report/body=]
@@ -675,22 +671,30 @@ <h3 id="queue-report" algorithm>
675
671
: [=report/attempts=]
676
672
:: 0
677
673
678
- 4. If |url| was not provided by the caller, let |url| be |settings|'s
674
+ 2. Let |environment| be |settings|'s < a > realm execution context</ a > 's
675
+ < a spec =ecmascript > realm</ a > 's < a spec =ecmascript lt =realm > ECMAScript
676
+ global environment</ a > .
677
+
678
+ 3. Execute [[#notify-observers]] with |environment| and |report|.
679
+
680
+ 4. If |settings|'s < a > report count</ a > contains an entry
681
+ with < a spec =infra > key</ a > |type|, then increment that entry. Otherwise,
682
+ create an entry in |settings|'s < a > report count</ a >
683
+ with < a spec =infra > key</ a > |type| and < a spec =infra > value</ a > 1.
684
+
685
+ 5. If |settings|'s < a > report count</ a > [|type|] is greater than 100 and the
686
+ current < a spec ="netinfo "> saveData</ a > preference is true, return.
687
+
688
+ 6. If |url| was not provided by the caller, let |url| be |settings|'s
679
689
< a > creation URL</ a > .
680
690
681
- 5 . Set |url|'s {{URL/username}} to the empty string, and its {{URL/password}}
691
+ 7 . Set |url|'s {{URL/username}} to the empty string, and its {{URL/password}}
682
692
to `null`.
683
693
684
- 6 . Set |report|'s [=report/url=] to the result of executing the < a > URL
694
+ 8 . Set |report|'s [=report/url=] to the result of executing the < a > URL
685
695
serializer</ a > on |url| with the < em > exclude fragment flag</ em > set.
686
696
687
- 7. Append |report| to the < a > reporting cache</ a > .
688
-
689
- 8. Let |environment| be |settings|'s < a > realm execution context</ a > 's
690
- < a spec =ecmascript > realm</ a > 's < a spec =ecmascript lt =realm > ECMAScript
691
- global environment</ a > .
692
-
693
- 9. Execute [[#notify-observers]] with |environment| and |report|.
697
+ 9. Append |report| to the < a > reporting cache</ a > .
694
698
695
699
Note: < a > reporting observers</ a > can only observe reports from the
696
700
same < a > environment settings object</ a > .
0 commit comments