<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20496</bug_id>
          
          <creation_ts>2012-12-22 17:34:33 +0000</creation_ts>
          <short_desc>valueAsNumber&apos;s setter should be &quot;double&quot;, not &quot;unrestricted double&quot;. Or the prose needs to handle NaN/Infinity.</short_desc>
          <delta_ts>2013-02-13 20:21:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#dom-input-valueasnumber</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>cam</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>mounir</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80538</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-12-22 17:34:33 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#dom-input-valueasnumber
Complete: http://www.whatwg.org/c#dom-input-valueasnumber

Comment:
valueAsNumber&apos;s setter should be &quot;double&quot;, not &quot;unrestricted double&quot;. Or the
prose needs to handle NaN/Infinity.

Posted from: 76.102.14.57
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.101 Safari/537.11</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80539</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-22 17:35:58 +0000</bug_when>
    <thetext>heycam: Here&apos;s another example of wanting a different setter type than getter type. I want to return NaN sometimes (unrestricted double), but the setter needs to just be double.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80540</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-22 17:38:13 +0000</bug_when>
    <thetext>Actually for NaN volkmar suggests that setting the value to &quot;&quot; might be more useful. (This is what Gecko does.) Still need to throw for Infinity, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80660</commentid>
    <comment_count>3</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2012-12-28 13:06:19 +0000</bug_when>
    <thetext>Gecko/Firefox 20 implements the following behaviour:
- |.valueAsNumber = NaN;| will set the value to the empty string (ie. equivalent to |.value = &quot;&quot;;|.
- |.valueAsNumber = Infinity;| (or -Infinity) will throw without changing the value. Not that for the moment, Gecko doesn&apos;t throw TypeError for internal reasons. This will happen later.

This change should be soon (max 24 hours) available in a Nightly build. To test it on a Desktop version of Firefox, you have to enable the following pref in about:config: &quot;dom.experimental_forms&quot;. The pref is enabled by default on Firefox Mobile.

More information about the change:
https://bugzilla.mozilla.org/show_bug.cgi?id=825009</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83121</commentid>
    <comment_count>4</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-02-13 20:21:27 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7723.
Check-in comment: Define setting valueAsNumber to Infinity or NaN.
http://html5.org/tools/web-apps-tracker?from=7722&amp;to=7723</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>