- From: Joseph Orbegoso Pea <notifications@github.com>
- Date: Wed, 08 Jun 2016 17:17:36 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc:
Received on Thursday, 9 June 2016 00:18:03 UTC
#517 covers two things: 1. ability to define attributes for custom elements (and optionally specify getters/setters for those attributes) 2. Ability for DOM API to accept anything, not just strings, for attributes. I'd like #517 to be about the first idea, and would like to make this issue specifically about the ability for DOM APIs like `setAttribute`/`getAttribute` to be able to accept any JavaScript values besides strings so that we can avoid performance costs from serialization/deserialization. We would be able to pass objects, arrays, numbers, instances of custom classes, etc. Please see #517 for details (maybe I can move those details here...). For example, imagine some error component specialized in displaying errors, who's error attribute can accept an actual instance of an `Error`: ```js try { // ... } catch (err) { let el = document.createElement('error-display') el.setAttribute('error', err) // ... } ``` --- 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
Received on Thursday, 9 June 2016 00:18:03 UTC