Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USBConnectionEvent needs a constructor #63

Closed
foolip opened this issue Sep 15, 2016 · 1 comment
Closed

USBConnectionEvent needs a constructor #63

foolip opened this issue Sep 15, 2016 · 1 comment

Comments

@foolip
Copy link
Member

foolip commented Sep 15, 2016

http://wicg.github.io/webusb/#events

It has a constructor in Chromium:
https://chromium.googlesource.com/chromium/src/+/2fe96ea775a73ad5dcc05105f57be096d302baa2/third_party/WebKit/Source/modules/webusb/USBConnectionEvent.idl

But unless device is made nullable, some tweaks are needed to ensure that it's never null, a non-optional dict with a required member:

[Constructor(DOMString type, USBConnectionEventInit eventInitDict)]
interface USBConnectionEventB : Event {
    [SameObject] readonly attribute USBDevice device;
};

dictionary USBConnectionEventInit : EventInit {
    required USBDevice device;
};
reillyeon added a commit that referenced this issue Sep 16, 2016
@foolip
Copy link
Member Author

foolip commented Sep 16, 2016

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants