WICG / webusb

Connecting hardware to the web.
https://wicg.github.io/webusb/
Other
1.32k stars 132 forks source link

Invalid WebIDL definition for USBPermissionStorage #118

Closed pes10k closed 6 years ago

pes10k commented 6 years ago

The WebIDL definition for USBPermissionStorage is currently

dictionary USBPermissionStorage {
  required sequence<AllowedUSBDevice> allowedDevices = [];
};

However, the WebIDL spec says that required dictionary entries cannot have default values. (re https://heycam.github.io/webidl/#required-dictionary-member)

Happy to open a PR for this, but should I drop the required, or the []?

reillyeon commented 6 years ago

The required can be removed as specifying a default value effectively means the entry will always be present.

Note, the USBPermissionStorage object may go away entirely because this specification needs to be updated to match the latest version of the Permissions API specification.

pes10k commented 6 years ago

Okie-dokie. Here is a PR that makes that minor change