From e8943374bc7447c6ab2d1b6b167a1590691bb4e1 Mon Sep 17 00:00:00 2001 From: Ian Clelland Date: Sun, 4 Dec 2022 21:30:23 +0100 Subject: [PATCH] Change Report and ReportBody interfaces to dicts. This change removes any suggestion that the two interface names (and the names of those interfaces which inherit from `ReportBody`) should be exposed on the global object. `ReportBody` is purely abstract, and exists so that it can be used as the type of the `body` member of `Report`, while still allowing other specifications to define new subtypes for their own report types. Closes: #216 --- index.src.html | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/index.src.html b/index.src.html index f0fc84b..8b6b887 100644 --- a/index.src.html +++ b/index.src.html @@ -679,17 +679,13 @@

Reporting Observers

Interface {{ReportingObserver}}

-[Exposed=(Window,Worker)]
-interface ReportBody {
-  [Default] object toJSON();
+dictionary ReportBody {
 };
 
-[Exposed=(Window,Worker)]
-interface Report {
-  [Default] object toJSON();
-  readonly attribute DOMString type;
-  readonly attribute DOMString url;
-  readonly attribute ReportBody? body;
+dictionary Report {
+  DOMString type;
+  DOMString url;
+  ReportBody? body;
 };
 
 [Exposed=(Window,Worker)]
@@ -710,11 +706,11 @@ 

Interface {{ReportingObserver}}

typedef sequence<Report> ReportList;
- A Report is the application exposed - representation of a report. type - returns [=report/type=], url returns - [=report/url=], and body returns - [=report/body=]. + A Report is the application-exposed + representation of a report. + + ReportBody is an abstract dictionary + type from which specific report types should inherit. Each {{ReportingObserver}} object has these associated concepts: - A callback function set on creation.