w3c / w3c/wot-scripting-api

Should writeProperty() return a value

Open
#193 38 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

for next iteration use case wait-for-td
Dominant language
HTML
Stars
45
Forks
21
PR merge metrics
No merged PRs in 30d

Description

We currently have the following definition for writeProperty()

  Promise<void> writeProperty(DOMString propertyName,
                              any value,
                              optional InteractionOptions options = null);

I wonder whether the return value should be Promise<any> instead of Promise<void> ?

There may be different use-cases were a server might modify the value initially provided (e.g., round a number 1.2345 to 1.23 by limiting digits) and returning the actually set value would be helpful. No additional readProperty() needed.

What are the consequences of such a change?

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.

Research direction

Start with the writeProperty() definition shown in the issue and review the 38-comment discussion for the unresolved consequences of changing its return type. Determine whether the API should return the server-modified value and document the agreed behavior and compatibility impact; the issue does not name any files or tests.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.