diff --git a/index.html b/index.html index db81e7d2..3d8bd596 100644 --- a/index.html +++ b/index.html @@ -1018,11 +1018,11 @@

The ConsumedThing interface

Promise<Subscription> observeProperty(DOMString name, InteractionListener listener, optional ErrorListener onerror, - optional InteractionOptions options = null); + optional SubscriptionOptions options = null); Promise<Subscription> subscribeEvent(DOMString name, InteractionListener listener, optional ErrorListener onerror, - optional InteractionOptions options = null); + optional SubscriptionOptions options = null); ThingDescription getThingDescription(); }; @@ -1032,6 +1032,10 @@

The ConsumedThing interface

any data; }; + dictionary SubscriptionOptions: InteractionOptions{ + boolean once = false; + }; + [SecureContext, Exposed=(Window,Worker)] interface Subscription { readonly attribute boolean active; @@ -1488,6 +1492,10 @@

The observeProperty() method

  • Invoke |listener| with |reply|.
  • +
  • + If |options|' |once| is `true`, invoke |subscription|'s + stop() method with |options|. +
  • @@ -1505,6 +1513,10 @@

    The observeProperty() method

  • If |onerror| is a {{Function}}, invoke it with |error|.
  • +
  • + If |options|' |once| is `true`, invoke |subscription|'s + stop() method with |options|. +
  • @@ -1635,6 +1647,10 @@

    The subscribeEvent() method

    parse interaction response on the data provided with the Event, [[\form]] and [[\interaction]]. +
  • + If |options|' |once| is `true`, invoke |subscription|'s + stop() method with |options|. +
  • @@ -1652,6 +1668,10 @@

    The subscribeEvent() method

  • If |onerror| is a {{Function}}, invoke it with |error|.
  • +
  • + If |options|' |once| is `true`, invoke |subscription|'s + stop() method with |options|. +
  • @@ -1695,6 +1715,19 @@

    +
    +

    + The SubscriptionOptions dictionary +

    +

    + Extends InteractionOptions for subscriptions. +

    +

    + The once property if not defined, takes the value `false`. If defined as `true`, will cause stopping the + subscription after the first notification. +

    +
    +

    The PropertyMap type