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

Requirements for SpeechSynthesisErrorEvent #107

Open
jugglinmike opened this issue Oct 7, 2022 · 1 comment
Open

Requirements for SpeechSynthesisErrorEvent #107

jugglinmike opened this issue Oct 7, 2022 · 1 comment

Comments

@jugglinmike
Copy link

Chromium's implementation of SpeechSynthesisErrorEvent (at version 105) requires the utterance property in the SpeechSynthesisEventInit interface.

new SpeechSynthesisErrorEvent('d', {errror:'foo'})
VM456:1 Uncaught TypeError: Failed to construct 'SpeechSynthesisErrorEvent': Failed to read the 'utterance' property from 'SpeechSynthesisEventInit': Required member is undefined.
    at <anonymous>:1:1

Firefox's implementation (at version 105) behaves similarly:

new SpeechSynthesisErrorEvent('d', {errror:'foo'})
Uncaught TypeError: SpeechSynthesisErrorEvent constructor: Missing required 'utterance' member of SpeechSynthesisEventInit.
    <anonymous> debugger eval code:1

The only reference I can find to an initializer property with that name is 2018's gh-45, where it was added as a requirement for the SpeechSynthesisEvent. I can't tell if this was an omission at that time, a more recent (though undocumented) development in the design of this proposal, a bug in these implementations, or something else altogether. @foolip do you have any thoughts on this?

@foolip
Copy link
Collaborator

foolip commented Oct 14, 2022

The utterance member is required because SpeechSynthesisErrorEventInit inherits from SpeechSynthesisEventInit:

dictionary SpeechSynthesisErrorEventInit : SpeechSynthesisEventInit {
    required SpeechSynthesisErrorCode error;
};

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