W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Re: Minimum viable custom elements

From: Anne van Kesteren <annevk@annevk.nl>
Date: Wed, 4 Feb 2015 16:48:13 +0100
Message-ID: <CADnb78iMoTXuxVR+1m=kAFctUQXTZUFxyh0bEyCnzdg4G0T+vw@mail.gmail.com>
To: Chris Bateman <chrisb808@gmail.com>
Cc: Ryosuke Niwa <rniwa@apple.com>, Steve Faulkner <faulkner.steve@gmail.com>, WebApps WG <public-webapps@w3.org>
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

  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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:43 UTC