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

MIDIMessageEvent data is not nullable #233

Closed
padenot opened this issue May 18, 2022 · 6 comments
Closed

MIDIMessageEvent data is not nullable #233

padenot opened this issue May 18, 2022 · 6 comments
Assignees
Labels
class: substantive https://www.w3.org/policies/process/#correction-classes
Milestone

Comments

@padenot
Copy link
Member

padenot commented May 18, 2022

STR in Chrome:

> var event = new MIDIMessageEvent("something");
> console.log(event.data);
< null

MIDIMessageEvent.data is not nullable, so this should be an empty array. It's harmless to allow an empty MIDIMessageEvent but it's not particularly useful either. We can change the spec for compat instead of having Chrome fixed maybe.

@hoch
Copy link
Member

hoch commented May 18, 2022

partial interface MIDIMessageEvent : Event {
  readonly attribute Uint8Array? data;
}

Does this look good? I agree that null is better.

@hoch hoch added the status: needs WG review Needs to be discussed with the Audio Working Group before proceeding label May 18, 2022
@padenot
Copy link
Member Author

padenot commented May 19, 2022

dictionary MIDIMessageEventInit: EventInit {
  Uint8Array? data;
};

? is implied, the opposite being to specify require iirc.

@hoch
Copy link
Member

hoch commented May 19, 2022

Yes. Then we can lose the dictionary bit. I edited my comment above. Thanks!

@padenot padenot self-assigned this May 19, 2022
@hoch hoch added status: ready for editing Enough information should be available to implement this change in the spec and removed status: needs WG review Needs to be discussed with the Audio Working Group before proceeding labels May 19, 2022
@padenot
Copy link
Member Author

padenot commented May 19, 2022

@padenot
Copy link
Member Author

padenot commented May 19, 2022

#168 seems to be a dupe, I'll sort it out.

@mjwilson-google mjwilson-google added the class: substantive https://www.w3.org/policies/process/#correction-classes label Sep 13, 2023
@mjwilson-google mjwilson-google added this to the CR milestone Sep 14, 2023
@mjwilson-google
Copy link
Contributor

Fixed by #252

@mjwilson-google mjwilson-google removed the status: ready for editing Enough information should be available to implement this change in the spec label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
class: substantive https://www.w3.org/policies/process/#correction-classes
Projects
None yet
Development

No branches or pull requests

3 participants