w3c / wot-scripting-api

Web of Things (WoT) Scripting API
http://w3c.github.io/wot-scripting-api/
Other
43 stars 28 forks source link

Update listener internal slots to map<name, structure> #470

Open zolkis opened 1 year ago

zolkis commented 1 year ago

Currently internal slots for [[readHandlers]], [[writeHandlers]], etc. are a map from name to a handler function.

Besides that function, the steps require saving |options| and other information as well. So the internal slots will need to contain an object like

dictionary HandlerData {
    required function handler;
    sequence<InteractionOptions> subscriberOptions;
    sequence<any> subscriberData;
}

We could also add the |interaction| for convenience, but it can me retrieved using |name|.

relu91 commented 1 year ago

Call 24/04/2023:

relu91 commented 1 year ago

Call 15/05/2023

relu91 commented 11 months ago

I can confirm that the current structure of the internal slot [[readHandlers]] is not the same as described above. My question is do we have evidence requiring the data contained in the updated dictionary?