- From: Daniel Huigens <notifications@github.com>
- Date: Thu, 20 Aug 2026 08:20:30 -0700
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 20 August 2026 15:20:35 UTC
twiss created an issue (whatwg/webidl#1629) ### What is the issue with the Web IDL Standard? (This came up in https://github.com/w3c/webcrypto/issues/429#issuecomment-3916606836.) Currently, the default for integer types is for values outside the range of the type to be reduced modulo the maximum value. But, it's a bit unclear how often we actually want that behavior, especially for new usages. Perhaps it may be worth switching the default for integer types to be `[EnforceRange]`, and create a new extended attribute for when you want the current behavior, perhaps `[Modulo]` or some such? If it seems reasonable, I can make a PR, though I realize this would likely cause churn in other specs. (This would also resolve https://github.com/whatwg/webidl/issues/842 in the sense that when reusing a type between values that get passed and returned, you don't need any annotation when you want the `[EnforceRange]` behavior when passing the value. Having a `[Modulo]` attribute on a type that only ever gets returned would still be surprising/unexpected, as today with `[EnforceRange]`.) -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/webidl/issues/1629 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/webidl/issues/1629@github.com>
Received on Thursday, 20 August 2026 15:20:35 UTC