w3c / FileAPI

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

Re-add readAsBinaryString() #44

Closed inexorabletash closed 8 years ago

inexorabletash commented 8 years ago

In spec drafts circa 2011 a readAsBinaryString() method was present, predating Typed Array and readAsArrayBuffer() support. Per https://github.com/w3c/FileAPI/issues/39 this is supported by all major browsers and used in a variety of libraries, so we should accept it as a web-compat necessity and specify it.

annevk commented 8 years ago

This doesn't seem to actually define/update the read operation?

inexorabletash commented 8 years ago

This doesn't seem to actually define/update the read operation?

https://w3c.github.io/FileAPI/#readOperationSection is used for all of the readXXX() methods. Can you clarify what is missing and/or needs updating?

inexorabletash commented 8 years ago

This CL matches the style for the other methods. I agree they should be improved, but ISTM that should be done separately so they are consistent.

https://w3c.github.io/FileAPI/#dfn-result has:

The list below is normative for the result attribute and is the conformance criteria for this attribute

... and then proceeds to define how the various methods generate result types, which (with this CL) defines binary string. And that section could also be improved, but again this CL just matches the existing style.

annevk commented 8 years ago

Mkay... The existing style is not great.

mkruisselbrink commented 8 years ago

Agreed that the way these read operations are defined isn't great, and that it would be nice to have a more explicit definition of "binary string". I filed #45 to reword these things.