- From: Sam Weinig <notifications@github.com>
- Date: Fri, 30 Jan 2026 10:10:41 -0800
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 30 January 2026 18:10:45 UTC
weinig created an issue (whatwg/webidl#1566)
### What problem are you trying to solve?
There is currently syntax to specify a default value empty `sequence` (`= []`) and a default value default `dictionary` (`= {}`), but no way to specify a default value empty `record<K, V>`.
This is needed to eliminate the invalid syntax used by WebGPU's [GPUDeviceDescriptor](https://gpuweb.github.io/gpuweb/#gpudevicedescriptor), which tries to the default `dictionary` (` = {}`) to default initialize the `record<K, V>` member [requiredLimits](https://gpuweb.github.io/gpuweb/#dom-gpudevicedescriptor-requiredlimits):
```idl
dictionary GPUDeviceDescriptor
: GPUObjectDescriptorBase {
sequence<GPUFeatureName> requiredFeatures = [];
record<DOMString, (GPUSize64 or undefined)> requiredLimits = {};
GPUQueueDescriptor defaultQueue = {};
};
```
(I have also filed https://github.com/gpuweb/gpuweb/issues/5529 on WebGPU to remove the invalid syntax).
### What solutions exist today?
_No response_
### How would you solve it?
_No response_
### Anything else?
_No response_
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1566
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/webidl/issues/1566@github.com>
Received on Friday, 30 January 2026 18:10:45 UTC