Skip to content

Commit

Permalink
Change Report and ReportBody interfaces to dicts.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
clelland committed Dec 4, 2022
1 parent 9ef0608 commit e894337
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions index.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -679,17 +679,13 @@ <h2 id="observers">Reporting Observers</h2>
<h3 id=interface-reporting-observer>Interface {{ReportingObserver}}</h3>

<pre class="idl">
[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)]
Expand All @@ -710,11 +706,11 @@ <h3 id=interface-reporting-observer>Interface {{ReportingObserver}}</h3>
typedef sequence&lt;Report> ReportList;
</pre>

A <dfn id=dom-report interface>Report</dfn> is the application exposed
representation of a <a>report</a>. <dfn attribute for="Report">type</dfn>
returns [=report/type=], <dfn attribute for="Report">url</dfn> returns
[=report/url=], and <dfn attribute for="Report">body</dfn> returns
[=report/body=].
A <dfn id=dom-report dictionary>Report</dfn> is the application-exposed
representation of a <a>report</a>.

<dfn id="reportbody" dictionary>ReportBody</dfn> is an abstract dictionary
type from which specific report types should inherit.

Each {{ReportingObserver}} object has these associated concepts:
- A <dfn for=ReportingObserver>callback</dfn> function set on creation.
Expand Down

0 comments on commit e894337

Please sign in to comment.