This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10290 - The type attribute needs to be restricted to only known values to match browser behavior.
Summary: The type attribute needs to be restricted to only known values to match brows...
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
: 10289 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-03 18:47 UTC by contributor
Modified: 2010-10-04 14:48 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2010-08-03 18:47:28 UTC
Section: http://www.whatwg.org/specs/web-apps/current-work/#the-button-element

Comment:
The type attribute needs to be restricted to only known values to match
browser behavior.

Posted from: 68.175.61.233
Comment 1 Aryeh Gregor 2010-08-03 18:51:28 UTC
Test case:

data:text/html,<!doctype html>
 <script>
 alert(document.createElement('button').type);
 </script>

Should alert "" per spec, actually alerts "submit".  Likewise:

data:text/html,<!doctype html>
 <script>
 var el = document.createElement('button');
 el.type = 'foo';
 alert(el.type);
 </script>

Should alert "foo", actually alerts "submit".  Tested in Firefox 4, Chrome dev, Opera 10.60.
Comment 2 Ms2ger 2010-08-03 19:00:06 UTC
*** Bug 10289 has been marked as a duplicate of this bug. ***
Comment 4 Aryeh Gregor 2010-08-06 20:00:51 UTC
FIXED seems more appropriate than WORKSFORME, no?