This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Hello, Step 1 of window.scroll algorithm (http://www.w3.org/TR/cssom-view/#dom-window-scroll) is to check whether the coordinates x and y are infinite or nan. However, the signature of the scroll method indicates that the type of those variables is "long", making infinite and nan values impossible. Is it possible that the original intention was to make the coordinate values float or double? Otherwise, should this step exist at all? The survey of the major browsers shows that this step is ignored (tested IE9, Chrome, Firefox). Thanks, Svitlana
(In reply to comment #0) > Hello, > > Step 1 of window.scroll algorithm > (http://www.w3.org/TR/cssom-view/#dom-window-scroll) is to check whether the > coordinates x and y are infinite or nan. However, the signature of the > scroll method indicates that the type of those variables is "long", making > infinite and nan values impossible. I think that step predated WebIDL throwing for those values. Fixed: https://dvcs.w3.org/hg/csswg/rev/9b737ecc8598 https://dvcs.w3.org/hg/csswg/rev/d1dbf4fde303 > Is it possible that the original intention was to make the coordinate values > float or double? Otherwise, should this step exist at all? float and double also disallow NaN/infinity per WebIDL. > The survey of the major browsers shows that this step is ignored (tested > IE9, Chrome, Firefox). Opera implements this step. Firefox/Chrome/IE9 seem to treat NaN/-Infinity/Infinity as 0. I'd like to see if throwing TypeError instead is Web-compatible before using "unrestricted long" in the spec.