[whatwg] input[type="add"]?

Ian Hickson ian at hixie.ch
Wed Jun 16 02:18:17 PDT 2004


On Thu, 10 Jun 2004, Erik Arvidsson wrote:
>
> Would it not be better to limit the repetition buttons to <button> since
> that would be backwards compatible. In a non-conforming user agent
> inputs with unrecognized type attributes are usually treated as
> type="text" and would therefore be a lot harder to work with. For
> <button> one can easily add an onclick (DOMActivate) and do the logic
> using javascript but if <input> is allowed this will make it a lot
> harder.
>
> What is the main reason for supporting both input and button?

Both are allowed because there seemed to be a convention in HTML4 to
support both, and it doesn't seem harmful.

I've changed the spec to use <button> in the examples, but bear in mind
that the default action of <button> in legacy UAs is to submit.

Actually maybe that's a good thing. It would mean you could implement all
of this on the server side if the client side doesn't have JS enabled.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list