w3c / w3c/wot-scripting-api

ObserveProperty with uri vars

Open
#539 6 comments 0 reactions 1 assignee View on GitHub

@danielpeintner is already working on this.

Since Apr 1, 2026.

bug question use case
Dominant language
HTML
Stars
45
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Hello,
Could someone clarifies something for me?
In the ObserveProperty method: https://w3c.github.io/wot-scripting-api/#the-observeproperty-method

This algorithm allows for only one active Subscription per Property. If a new Subscription is made while an existing Subscription is active the runtime will throw an NotAllowedError.
And #6 confirms
If thing.[activeObservations][propertyName] [=map/exists], [reject] promise with a [NotAllowedError] and stop.

But in the case of using uriVars, do we consider the subscription is the same, even if the uriVars are different?

#8 indicates:

Make a request to the underlying platform to observe the [Property] identified by propertyName with form and optional URI templates given in options' uriVariables.

What if we already made a previous request, .../propertyA?v=X
but we want to make a new request for .../propertyA?v=Y

And I believe there is a mistake in subscribeEvent() https://w3c.github.io/wot-scripting-api/#the-subscribeevent-method
#6 says

If thing.[activeSubscriptions][eventName] DOES NOT exist, reject promise with a [NotAllowedError] and stop.

Thanks for your help?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.