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

What does it mean to invoke the Blob constructor with zero parameters? #54

Open
bzbarsky opened this issue Nov 24, 2016 · 1 comment · May be fixed by #125
Open

What does it mean to invoke the Blob constructor with zero parameters? #54

bzbarsky opened this issue Nov 24, 2016 · 1 comment · May be fixed by #125

Comments

@bzbarsky
Copy link

For example, what should this do:

var b = new Blob(undefined, { type: "foo" });

? Should b.type be empty string or "foo"? In any case, there is no concept of "number of parameters" for IDL implementation algorithms, so please define the behavior in terms of concepts that do exist.

@annevk
Copy link
Member

annevk commented Nov 24, 2016

What I think we want to end up with is b.type is "foo" and b's size is 0.

One way to make this easier to define is to change the IDL to default to the empty sequence, which is now a thing. Then both parameters are always provided and the prose does not have to worry about them being omitted.

@bzbarsky bzbarsky changed the title Whatdoes it mean to invoke the Blob constructor with zero parameters? What does it mean to invoke the Blob constructor with zero parameters? Nov 24, 2016
annevk added a commit that referenced this issue Apr 5, 2019
All implementations do something different for new Blob(undefined, { type: "x/x" }). Let's do something simple.

Fixes #54.
@annevk annevk linked a pull request Apr 5, 2019 that will close this issue
annevk added a commit that referenced this issue Apr 14, 2020
All implementations do something different for new Blob(undefined, { type: "x/x" }). Let's do something simple.

Fixes #54.
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

Successfully merging a pull request may close this issue.

2 participants