diff --git a/index.html b/index.html index b0b2ee8..d8fe179 100644 --- a/index.html +++ b/index.html @@ -1275,7 +1275,70 @@
+ Belongs to the WoT Consumer conformance class.
+ An {{ActionInteractionOutput}} object is always created by a consumer implementation
+ and exposes functionality to interact with long running (asynchronous) actions.
+ Note: a synchronous action MAY not offer any
+ This interface exposes an action status object. Its implementation + will allow cancelling asynchronous actions and report the status of a long running action. +
++ enum ActionStatus { + "running", + "success", + "error" + }; + + [SecureContext, Exposed=(Window,Worker)] + interface ActionInteractionOutput : InteractionOutput { + readonly attribute object? error; + Promise<ActionStatus> status(); + Promise<undefined> cancel(); + }; ++
+ The error property represents a possible error, initially `null`. +
++ +
++ Should we allow pause/resume also? TD has no notion of it. +
+running
, success
or error
) or rejects on error. The method MUST run the following steps:
+ As illustrated in the next pictures, the {{InteractionOutput}} interface is used every time implementations provide data to scripts, while @@ -1323,7 +1386,7 @@
When a {{ConsumedThing}} invokes an Action, it provides the parameters as {{InteractionInput}} and receives the output of the - Action as an {{InteractionOutput}} object. + Action as an {{ActionInteractionOutput}} object.