Re: [WICG/webcomponents] Proposal: Custom attributes for all elements, enhancements for more complex use cases (Issue #1029)

I haven't consumed this whole thread, but I'm pretty sure these points haven't been raised:

I'm assuming that the dashes requirement is to avoid clashes with 'official' attributes. This doesn't work, because with reflection, a `read-only` attribute still maps to a `readOnly` property, so you still have the namespace clash.

When automatically mapping attribute and property names, it's usually better to start from the property name. I know this isn't a real example, but `innerHTML` would map to `inner-html`. There's no way to automatically go from `inner-html` to `innerHTML`.

If reflection is supported, the attribute should be the source of truth. That's how it works in HTML.

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

Message ID: <WICG/webcomponents/issues/1029/2454991200@github.com>

Received on Monday, 4 November 2024 15:19:41 UTC