logoalt Hacker News

karhutontoday at 6:21 AM2 repliesview on HN

My understanding is Apple / Webkit is blocking custom element extension on native HTML elements, which would cut down this 500 line monster to:

class SaganButton extends HTMLButtonElement { … }

Anyone know the reasoning they’re blocking this?


Replies

droidrungrowthtoday at 8:27 AM

The is="" customized-built-in path (extends HTMLButtonElement) is exactly what would collapse that 500-line reimplementation. Safari refusing it is why you still fall back to a full autonomous element + ElementInternals.

chuckadamstoday at 6:43 AM

The only browser Apple is blocking it on is Safari: other browsers implement it just fine, and the standard passed over Apple's objections. The rationale was architectural, arguing that extending built-in components would lead either to brittle components that would break when new properties were added or causing the specification of builtin components to freeze forever to avoid such breakage. I'm not sure I buy the arguments 100%, but for sure it's not evil/incompetent board executives twirling their mustaches as they deliberately break the web: https://github.com/WICG/webcomponents/issues/509#issuecommen...

show 2 replies