This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The algorithm to convert ECMAScript values to various IDL types (octet, short, etc.) specifies that they wrap if they're out of range, by saying that they're taken mod 2^8 or 2^16 or whatever. Is this behavior really necessary? Clamping to the nearest allowed value is much nicer behavior, if it's compatible with how browsers behave.
Is it compatible? (Note that generally wrapping is faster to do, so unless there's a good reason to expect that people will need to rely on the clamping it's easier to not support it.)
I don't know about compatibility with content. I'm inclined to leave it as is, for the reason Boris states, and that the wrapping is what the ES5 spec uses when builtin functions need to convert a value to an integer. FWIW, data:text/html,<script>a=document.createElement("input");a.size=4294967297;alert(a.size)</script> alerts "1" (4294967297 being 2^32+1) in Firefox, Safari, Chrome and IE. In Opera it alerts "-2147483648"