w3c / FileAPI

File API
https://w3c.github.io/FileAPI/
Other
104 stars 44 forks source link

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

Open bzbarsky opened 7 years ago

bzbarsky commented 7 years ago

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 commented 7 years ago

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.