Skip to content

Commit 2a94197

Browse files
authored
Merge pull request #220 from zolkis/namespace-wot
Fix #215: make the API entry point a namespace.
2 parents 028aeff + c049d30 commit 2a94197

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

index.html

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -370,24 +370,20 @@ <h2>The <dfn>ThingDescription</dfn> type</h2>
370370
</section>
371371

372372
<section data-dfn-for="WOT">
373-
<h2>The <dfn>WoT API object</dfn></h2>
373+
<h2>The <dfn>WOT</dfn> namespace</dfn></h2>
374374
<p>
375-
Defines the API entry point exposed as a singleton and contains the API methods.
375+
Defines the <dfn>WoT API object</dfn> as a singleton and contains the API
376+
methods, grouped by conformance classes.
376377
</p>
377-
<section> <h3>The <dfn>WOT</dfn> interface</h3>
378-
<pre class="idl">
379-
[SecureContext, Exposed=(Window,Worker)]
380-
interface WOT {
381-
// methods defined in UA conformance classes
382-
};
383-
</pre>
384-
<p class="note">
385-
Browser implementations should use a namespace object such as <code>navigator.wot</code>. Standalone runtimes may expose the API object through mechanisms like <a href="https://nodejs.org/api/modules.html">require()</a> or <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-imports">import</a>.
386-
</p>
387-
</section>
378+
<pre class="idl">
379+
[SecureContext, Exposed=(Window,Worker)]
380+
namespace WOT {
381+
// methods defined in UA conformance classes
382+
};
383+
</pre>
388384
<section> <h3>The <dfn>consume()</dfn> method</h3>
389385
<pre class="idl">
390-
partial interface WOT {
386+
partial namespace WOT {
391387
Promise&lt;ConsumedThing&gt; consume(ThingDescription td);
392388
};
393389
</pre>
@@ -423,7 +419,7 @@ <h2>The <dfn>WoT API object</dfn></h2>
423419

424420
<section> <h3>The <dfn>produce()</dfn> method</h3>
425421
<pre class="idl">
426-
partial interface WOT {
422+
partial namespace WOT {
427423
Promise&lt;ExposedThing&gt; produce(ThingDescription td);
428424
};
429425
</pre>
@@ -448,7 +444,7 @@ <h2>The <dfn>WoT API object</dfn></h2>
448444

449445
<section> <h3>The <dfn>discover()</dfn> method</h3>
450446
<pre class="idl">
451-
partial interface WOT {
447+
partial namespace WOT {
452448
ThingDiscovery discover(optional ThingFilter filter = null);
453449
};
454450
</pre>

0 commit comments

Comments
 (0)