Description
In eaf8fd9 ("Cleaned up wrong TOC"), arangana made a change from readAsText(blob[, encoding])
to readAsText(blob[, label])
but I have not been able to find a motivation.
I'm proposing that the name encoding
is brought back in order to clarify what the parameter does, without having to read the surrounding text in the spec.
My main motivation for filing this issue is that some documentation generators depend on the wording in this spec, which trickles down an arguably poor parameter name choice to all developers using the DOM APIs. (See microsoft/TypeScript-DOM-lib-generator#536).
The reasoning for encoding
specifically is:
- It's the parameter name that had already been settled on in the spec from 2009–2013
- It's still used by respected documentation sources (eg., MDN)
- It's arguably the most concise description of what the valid input values are (eg.,
"UTF-8"
)
Here is what today's documentation looks like in Visual Studio Code (TypeScript) due to the name choice in this repository: