Re: Minimum viable custom elements

On Wed, Feb 4, 2015 at 3:43 PM, Chris Bateman <chrisb808@gmail.com> wrote:
> An better example of both A and B (than my previous hypothetical) might be
> GitHub's <time is="relative-time"> extension:
> https://github.com/github/time-elements/.

FWIW, I do want subclassing of builtins to work. Maybe not necessarily
at first, but definitely down the line. I just think it would be much
better if that could be <relative-time>.

A problem with this is styling. It seems
https://tabatkins.github.io/specs/css-extend-rule/ offers a way out
there:

  relative-time { @extend time }

Another problem are the logic checks in the implementation, typically
branched on localName. There's two solutions for these:

1. Change localName identity checks with "ignore global instanceof" checks.

2. Reimplement the various features elements have (focus, form
submission, a11y) as protocols that can be inherited.

Although 1) is fairly expensive as bz said various times so far, it's
probably more doable than 2) short term.


-- 
https://annevankesteren.nl/

Received on Wednesday, 4 February 2015 15:48:37 UTC