Skip to content

JavaScript property management in the WoT Scripting API #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mkovatsc opened this issue Oct 26, 2017 · 3 comments
Closed

JavaScript property management in the WoT Scripting API #77

mkovatsc opened this issue Oct 26, 2017 · 3 comments

Comments

@mkovatsc
Copy link
Contributor

#70 opened a discussion on JavaScript property management with writable, enumerable, and configurable (not to be confused with the TD writable for TD Properties!).

I would not expose this complexity to WoT Scripting API users. It just creates confusion. Since the Scripting API objects are not generic JavaScript objects, but standardized types, I do not even see the need for it.

@zolkis
Copy link
Contributor

zolkis commented Oct 26, 2017

OK, we can separate TD property management from implementation object property management, but we still do need to specify what language specific descriptors an implementation should use and what is the mapping with TD properties. This is mostly text, so the enums will be removed from WebIDL.

@zolkis
Copy link
Contributor

zolkis commented Feb 12, 2018

For better alignment with the TD spec, we could remove the enumerable and configurable attributes from ThingPropertyInit, and add observable.

Indeed, Thing Properties are not properties on a JS object (though there is an issue proposing exactly that) but internal slots on the Thing object that carry all information from the TD related to the Property.

@zolkis
Copy link
Contributor

zolkis commented Feb 14, 2018

Addressed by #86.

@zolkis zolkis closed this as completed Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants