gpuRequiredLimits function
limits as GPUDeviceDescriptor.requiredLimits takes them.
The IDL types it as a record of name to number, which has no Dart spelling
past JSObject — so the map is built here rather than at every call site
that wants one limit raised.
Implementation
JSObject gpuRequiredLimits(Map<String, int> limits) {
final object = JSObject();
for (final entry in limits.entries) {
object.setProperty(entry.key.toJS, entry.value.toJS);
}
return object;
}