- From: Brett Zamir <notifications@github.com>
- Date: Wed, 08 Nov 2017 20:55:56 +0000 (UTC)
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 8 November 2017 20:56:18 UTC
Sure, but for libraries which enhance an element, providing a kind of public API, there is the risk/concern that the wrapped element API will block future use of a new built-in API without modifications being required of the library and modification of prior consumer code. This is a very practical concern. And sorry, I didn't mean to add "attributes" in the title. But speaking of which, to be clear, since `dataset` converts values to strings, leveraging that feature of course doesn't meet the objective here for supporting non-strings like functions. And while setting element properties (as opposed to attributes) with `data-*` doesn't seem to result in the same conversion treatment, encouraging the overloading of the same syntax relating to attributes may contribute to a mistaken impression that setting `elem.setAttribute('data-foo', 5)` is equivalent to `elem['data-foo'] = 5` (of course, any other namespacing format for property overloading would have the same distinction between attributes and properties, but it would not come with the baggage of being associated with attribute use, and the spec could even explicitly discourage using attributes of the same format, even though its current reserving of `data-*` may be enough.) -- 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/700#issuecomment-342956611
Received on Wednesday, 8 November 2017 20:56:18 UTC