- From: Zambonifofex <notifications@github.com>
- Date: Sun, 12 Jun 2016 11:35:12 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc:
Received on Sunday, 12 June 2016 18:35:41 UTC
> Can you explain what you mean by "properties"? Maybe I don't understand? Do you mean regular JS properties? If so, plain JS properties aren't hooked into the HTML engine, that's the downside. Yeah, I mean just regular JavaScript properties. And so what if they aren’t “hooked into the HTML engine”? You could simply read from an attribute and set a property: ```HTML <my-element data-my-attribute="[1, 2, 3]"></my-element> ``` ```JavaScript class MyElement extends HTMLElement { // ... attributeChangedCallback(name, o, n) { if(name === "data-my-attribute") { this.myProperty = JSON.parse(n); } } } ``` --- 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-225452803
Received on Sunday, 12 June 2016 18:35:41 UTC