- From: Ian Hickson <ian@hixie.ch>
- Date: Sun, 1 Feb 2009 08:30:19 +0000 (UTC)
- To: Philip Taylor <pjt47@cam.ac.uk>
- Cc: HTML WG <public-html@w3.org>
On Mon, 29 Dec 2008, Philip Taylor wrote: > > In the section "Reflecting content attributes in DOM attributes": > > "If a reflecting DOM attribute is a floating point number type (float) > and it doesn't fall into one of the earlier categories, then, [...] On > setting, the given value must be converted to the shortest possible > string representing the number as a valid floating point number in base > ten and then that string must be used as the new content attribute > value." > > [...] it's ambiguous, and also weird. > > It would seem more sensible to use something like ECMAScript's > Number.toString(), which appears to give: [...] Done. > It would be nice to explicitly note that the float value will never be > non-finite (since an exception will have been thrown earlier if you > passed in a non-finite value), so it's clear that it doesn't matter that > the spec doesn't define how to convert non-finite values into strings. Done. On Mon, 29 Dec 2008, Philip Taylor wrote: > > The definition of "valid floating point number" does not allow numbers > like "1e+10", and the "rules for parsing floating point number values" > will not accept the "+" and will parse it into the number 1. > > Many (most? all?) programming languages serialise large floating-point > numbers using "+". [...] > > Thus, it would be better for authors if "+" was allowed in floating > point number attributes. Done. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 1 February 2009 08:30:56 UTC