Re: [w3c/FileAPI] Consider substituting optional BlobPart or sequence<BlobPart> for optional sequence<BlobPart> blobParts at constructor (#150)

Actually the use of `[]` is not particularly problematic from a front-end coding perspective. It is not clearly specified that, or `Set` is required to avoid conversion to string, at least not immediately clear in plain language at the specification, that could disambiguate from no use of `[]`. Consistency is the purpose of the suggestion: Why does `new Blob(void 0) // new Blob(undefined)` not output `Blob {size: 6, type: ""}` or `Blob {size: 9, type: ""}` if in fact any value not within `[]` or `Set` is converted to string? 

The change will avoid unexpected results when `[]` is not used. 

If the change is not worth it from a specification perspective a note describing that to avoid string conversion for the case of `new Blob(TypedArray)`, `new Blob([TypedArray])` should be used. That is, if including a note clarifying the case is not expensive: it would certainly be useful for readers of specification, and a reference point.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/FileAPI/issues/150#issuecomment-609472054

Received on Sunday, 5 April 2020 19:48:40 UTC