Skip to content

Commit 0b2ad3e

Browse files
committed
Add examples to report types
1 parent 80aa7d2 commit 0b2ad3e

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

index.src.html

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

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

11911210
<dfn>Intervention reports</dfn> indicate that a user agent has decided not to
@@ -1233,6 +1252,22 @@ <h3 id="intervention-report">Intervention</h3>
12331252
column number in [=InterventionReportBody/sourceFile=] of the offending
12341253
behavior (which prompted the intervention), or null otherwise.
12351254

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

12381273
<section>

0 commit comments

Comments
 (0)