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

Re: Minimum viable custom elements

From: Ryosuke Niwa <rniwa@apple.com>
Date: Tue, 03 Feb 2015 12:04:09 -0800
Cc: Anne van Kesteren <annevk@annevk.nl>, Steve Faulkner <faulkner.steve@gmail.com>, WebApps WG <public-webapps@w3.org>
Message-id: <6A5E6DF9-D29D-4305-9A99-9C697726FE9D@apple.com>
To: Chris Bateman <chrisb808@gmail.com>

> On Feb 3, 2015, at 7:13 AM, Chris Bateman <chrisb808@gmail.com> wrote:
> Why don't we just make all input elements support these new attributes we're adding?
> In my opinion, I'd say because you can't possibly cover every case - what about doing the same kind of formatting for social security numbers, credit card numbers, phone numbers, or who knows what else? How about other kinds of functionality - like a <textarea> that automatically resizes itself?

That sounds like a slightly different use case. Social security number, credit card number, etc… seems like a different input type to me while "numerals" or "radix" attributes are extra configurations/options each input type may respect.  While I agree allowing author defined input types will be useful, I'm not certain having two different mechanisms, namely "type" and "is" attributes, to specify the type of an input an element expects is a desirable approach.

> What kind of initializations does it have to do? 
> Yes, probably just adding a listener in this case – which you certainly could handle with event delegation. But maybe someone might want to simply execute some functionality when the element is created or attached. An input that automatically populates itself with a random number. An awful, contrived example for sure - but it wouldn't be possible with delegation alone.
> Again - simply wanted to make the point that devs do add functionality to native elements - so it might be handy to have custom element callbacks to assist with it.

That sounds rather hypothetical to me.  I would like to know a concrete use case in which the initialization of an author defined input type or an input configuration/option is impossible or too cumbersome to be implemented using existing API.

Adding a new feature to the Web platform incurs an inherently higher cost because multiple vendors have to coordinate, and removing or changing the behavior of a feature is virtually impossible.

- R. Niwa

Received on Tuesday, 3 February 2015 20:04:38 UTC

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