Skip to content

Commit dae1366

Browse files
authored
Merge pull request #114 from paulmeyer90/addreporttypeexamples
Add examples to report types.
2 parents c594ff2 + 1a39ceb commit dae1366

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

EXPLAINER.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Deprecations are reports indicating that a browser API or feature has been used
4747
"id": "websql",
4848
"anticipatedRemoval": "1/1/2020",
4949
"message": "WebSQL is deprecated and will be removed in Chrome 97 around January 2020",
50-
"sourceFile": "https://foo.com/index.js",
50+
"sourceFile": "https://example.com/index.js",
5151
"lineNumber": 1234,
5252
"columnNumber": 42
5353
}
@@ -73,7 +73,7 @@ An [intervention](https://github.com/WICG/interventions/blob/master/README.md) o
7373
"body": {
7474
"id": "audio-no-gesture",
7575
"message": "A request to play audio was blocked because it was not triggered by user activation (such as a click).",
76-
"sourceFile": "https://foo.com/index.js",
76+
"sourceFile": "https://example.com/index.js",
7777
"lineNumber": 1234,
7878
"columnNumber": 42
7979
}

index.src.html

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,25 @@ <h3 id="deprecation-report">Deprecation</h3>
11871187
number in [=DeprecationReportBody/sourceFile=] where the indicated API
11881188
was first used, or null otherwise.
11891189

1190+
<div class="example">
1191+
<pre>
1192+
{
1193+
"type": "deprecation",
1194+
"age": 27,
1195+
"url": "https://example.com/",
1196+
"user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0",
1197+
"body": {
1198+
"id": "websql",
1199+
"anticipatedRemoval": "1/1/2020",
1200+
"message": "WebSQL is deprecated and will be removed in Chrome 97 around January 2020",
1201+
"sourceFile": "https://example.com/index.js",
1202+
"lineNumber": 1234,
1203+
"columnNumber": 42
1204+
}
1205+
}
1206+
</pre>
1207+
</div>
1208+
11901209
<h3 id="intervention-report">Intervention</h3>
11911210

11921211
<dfn>Intervention reports</dfn> indicate that a user agent has decided not to
@@ -1214,8 +1233,8 @@ <h3 id="intervention-report">Intervention</h3>
12141233
{{InterventionReportBody}}, contains the following fields:
12151234

12161235
- <dfn for="InterventionReportBody">id</dfn>: an implementation-defined
1217-
string identifying the specific intervention that occurred. This string can
1218-
be used for grouping and counting related reports.
1236+
string identifying the specific intervention that occurred. This string
1237+
can be used for grouping and counting related reports.
12191238

12201239
- <dfn for="InterventionReportBody">message</dfn>: A human-readable string
12211240
with details typically matching what would be displayed on the developer
@@ -1234,6 +1253,22 @@ <h3 id="intervention-report">Intervention</h3>
12341253
column number in [=InterventionReportBody/sourceFile=] of the offending
12351254
behavior (which prompted the intervention), or null otherwise.
12361255

1256+
<div class="example">
1257+
<pre>
1258+
{
1259+
"type": "intervention",
1260+
"age": 27,
1261+
"url": "https://example.com/",
1262+
"body": {
1263+
"id": "audio-no-gesture",
1264+
"message": "A request to play audio was blocked because it was not triggered by user activation (such as a click).",
1265+
"sourceFile": "https://example.com/index.js",
1266+
"lineNumber": 1234,
1267+
"columnNumber": 42
1268+
}
1269+
}
1270+
</pre>
1271+
</div>
12371272
</section>
12381273

12391274
<section>

0 commit comments

Comments
 (0)