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

Constructors for speech events #14

Closed
saschanaz opened this issue Jun 13, 2018 · 4 comments
Closed

Constructors for speech events #14

saschanaz opened this issue Jun 13, 2018 · 4 comments

Comments

@saschanaz
Copy link
Contributor

Currently new SpeechSynthesisEvent("pending", { utterance: new SpeechSynthesisUtterance() }) works on Edge and Firefox but throws on Chrome.

Edge: only requires the first argument
Firefox: requires both the first and second arguments
Chrome: always throws

Can we spec this to align browser behaviors?

@foolip
Copy link
Member

foolip commented Jun 13, 2018

Yes, it should have a constructor, also raised by @smaug---- before in https://www.w3.org/Bugs/Public/show_bug.cgi?id=28867.

Change should be trivial, but I'm currently converting the spec to Bikeshed, so best to do it after that.

@foolip
Copy link
Member

foolip commented Sep 19, 2018

When sending #45 I didn't read the issue description to spot that Edge and Firefox already disagree about whether the argument should be required.

In this case, I would like to align with Firefox, because otherwise the utterance attribute has to be nullable, and the only reason for it would be this constructor. That makes it less clear from looking at the IDL whether it can be null for user-agent-created events.

@minorninth
Copy link

Interop is good, but what's the use case for constructing one of these?

I suppose it's potentially useful for writing unit tests, but I can't think of anything else.

@smaug----
Copy link

Testing, and consistency with other events.

foolip added a commit that referenced this issue Sep 29, 2018
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

4 participants