Skip to content

Commit c55a6fb

Browse files
committed
Create an Endpoint Global and interface to be able to expose the JsonLdProcessor to something other than Window or Worker.
1 parent 597c378 commit c55a6fb

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

index.html

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5662,7 +5662,7 @@ <h3>Algorithm</h3>
56625662
as long as they generally use the same methods, arguments, and options
56635663
and return the same results.</span></p>
56645664

5665-
<p class="note">Interfaces are marked `[Exposed=JsonLdProcessor]`,
5665+
<p class="note">Interfaces are marked `[Exposed=Endpoint]`,
56665666
which creates a global interface.
56675667
The use of WebIDL in JSON-LD, while appropriate for use within browsers,
56685668
is not limited to such use.</p>
@@ -5687,8 +5687,15 @@ <h3>Algorithm</h3>
56875687
in this document mention this directly.</p>
56885688

56895689
<pre class="idl">
5690-
[Global=JsonLdProcessor, Exposed=JsonLdProcessor]
5690+
/*
5691+
* The Endpoint interface is created to expose the JsonLdProcessor interface.
5692+
*/
5693+
[Global=Endpoint, Exposed=Endpoint]
5694+
interface Endpoint {};
5695+
5696+
[Exposed=Endpoint]
56915697
interface JsonLdProcessor {
5698+
constructor();
56925699
static Promise&lt;JsonLdRecord> compact(
56935700
JsonLdInput input,
56945701
optional JsonLdContext context = null,
@@ -6085,7 +6092,7 @@ <h3>Algorithm</h3>
60856092
which has a <a>default graph</a> accessible via the <a data-link-for="RdfDataset">defaultGraph</a> attribute.</p>
60866093

60876094
<pre class="idl changed">
6088-
[Exposed=JsonLdProcessor]
6095+
[Exposed=Endpoint]
60896096
interface RdfDataset {
60906097
constructor();
60916098
readonly attribute RdfGraph defaultGraph;
@@ -6129,7 +6136,7 @@ <h3>Algorithm</h3>
61296136
which is composed of zero or more <a>RdfTriple</a> instances.</p>
61306137

61316138
<pre class="idl changed">
6132-
[Exposed=JsonLdProcessor]
6139+
[Exposed=Endpoint]
61336140
interface RdfGraph {
61346141
constructor();
61356142
void add(RdfTriple triple);
@@ -6158,7 +6165,7 @@ <h3>Algorithm</h3>
61586165
<p>The <dfn>RdfTriple</dfn> interface describes an <a>triple</a>.</p>
61596166

61606167
<pre class="idl changed">
6161-
[Exposed=JsonLdProcessor]
6168+
[Exposed=Endpoint]
61626169
interface RdfTriple {
61636170
constructor();
61646171
readonly attribute USVString subject;
@@ -6186,7 +6193,7 @@ <h3>Algorithm</h3>
61866193
<p>The <dfn>RdfLiteral</dfn> interface describes an <a>RDF Literal</a>.</p>
61876194

61886195
<pre class="idl changed">
6189-
[Exposed=JsonLdProcessor]
6196+
[Exposed=Endpoint]
61906197
interface RdfLiteral {
61916198
constructor();
61926199
readonly attribute USVString value;
@@ -6440,7 +6447,7 @@ <h3>RemoteDocument</h3>
64406447
to return information about a remote document or context.</p>
64416448

64426449
<pre class="idl">
6443-
[Exposed=JsonLdProcessor]
6450+
[Exposed=Endpoint]
64446451
interface RemoteDocument {
64456452
constructor();
64466453
readonly attribute USVString contentType;
@@ -7082,9 +7089,9 @@ <h2>Changes since Candidate Release of 05 March 2020</h2>
70827089
to update <var>cl reference</var> and not <var>node</var>.</li>
70837090
<li>Added <a href="#api-keywords" class="sectionRef"></a> to describe
70847091
the `preserve` keyword, which is only used for framing.</li>
7085-
<li>Removed the `[Exposed=(Window,Worker)]`
7086-
<a data-cite="WEBIDL#dfn-extended-attribute">extended attribute</a>
7087-
from <a href="#the-application-programming-interface" class="sectionRef"></a> to address review suggestions.</li>
7092+
<li>Changed `[Exposed=(Window,Worker)]` to `[Exposed=Endpoint]`,
7093+
which is declared as a global interface in order to expose the {{JsonLdProcessor}} interface
7094+
for non-browser usage to address review suggestions.</li>
70887095
</ul>
70897096
</section>
70907097
<section id="ack"

0 commit comments

Comments
 (0)