Re: [w3c/webcomponents] [idea] Allow HTML Element attributes to accept any type of value, not just strings. (#519)

@Zambonifofex That works, but it isn't obvious for libraries like `React` which JS properties to set unless we make a convention, and libraries aren't guaranteed to follow the convention. For example, React will not know to set `myProperty` on those types of Custom Elements unless React contains a whitelist, and that's not possible to do for the whole internet. In the case of Custom Elements, React (and other libraries) will simply send values via `setAttribute`, so the advantage of making this feature work with `setAttribute`/`getAttribute` is that all the libraries, which depend on that, can would be able to pass JS objects, not just strings.

There's no standard on how to map plain JS properties to HTML attributes.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/519#issuecomment-225453374

Received on Sunday, 12 June 2016 18:46:36 UTC