You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1475,7 +1468,7 @@ <h4>Internal slots for {{ConsumedThing}}</h4>
1475
1468
</section>
1476
1469
1477
1470
<section>
1478
-
<h4>Constructing<code>ConsumedThing</code></h4>
1471
+
<h4>Creating<code>ConsumedThing</code></h4>
1479
1472
<p>
1480
1473
After <ahref="#fetching-a-thing-description">fetching</a> a
1481
1474
<a>Thing Description</a> as a JSON object, one can create a
@@ -2653,21 +2646,21 @@ <h4>Internal slots for ExposedThing</h4>
2653
2646
</section>
2654
2647
2655
2648
<section>
2656
-
<h3>Constructing {{ExposedThing}}</h3>
2649
+
<h3>Creating {{ExposedThing}}</h3>
2657
2650
<p>
2658
-
The {{ExposedThing}} interface extends {{ConsumedThing}}. It
2659
-
is constructed from a full or partial {{ThingDescription}} object.
2651
+
The {{ExposedThing}} interface
2652
+
is created from a full or partial {{ThingDescription}} object.
2660
2653
</p>
2661
2654
<pclass="note">
2662
-
Note that an existing {{ThingDescription}} object can be optionally modified (for instance by adding or removing elements on its |properties|, |actions| and |events| internal properties) and the resulting object can used for constructing an
2655
+
Note that an existing {{ThingDescription}} object can be optionally modified (for instance by adding or removing elements on its |properties|, |actions| and |events| internal properties) and the resulting object can used for creating an
2663
2656
{{ExposedThing}} object. This is the current way of adding and
2664
2657
removing <a>Property</a>, <a>Action</a> and <a>Event</a> definitions, as illustrated in the <ahref="#exposedthing-examples">examples</a>.
2665
2658
</p>
2666
2659
<pclass="note">
2667
-
Before invoking <ahref="#dom-exposedthing-expose">expose()</a>, the {{ExposedThing}} object does not serve any requests. This allows first constructing {{ExposedThing}} and then initialize its <a>Properties</a> and service handlers before starting serving requests.
2660
+
Before invoking <ahref="#dom-exposedthing-expose">expose()</a>, the {{ExposedThing}} object does not serve any requests. This allows first creating {{ExposedThing}} and then initialize its <a>Properties</a> and service handlers before starting serving requests.
2668
2661
</p>
2669
2662
<div>
2670
-
To construct an {{ExposedThing}} with the {{ExposedThingInit}}
2663
+
To create an {{ExposedThing}} with the {{ExposedThingInit}}
<adata-cite="infra#parse-json-bytes-to-a-javascript-value">parsed JSON object</a> that has been validated according to the [[[WOT-TD]]] specification.
4299
4292
</p>
4300
4293
</section>
4301
-
<section><h4>Factory vs constructors</h4>
4302
-
<p>
4303
-
The factory methods for consuming and exposing <a>Thing</a>s are asynchronous and fully validate the input <a>TD</a>. In addition, one can also construct {{ConsumedThing}} and {{ExposedThing}} by providing a parsed and validated <a>TD</a>. Platform initialization is then done when needed during the WoT interactions.
0 commit comments