Description
While playing with TextEncoder
and TextDecoder
, I found that the comments for those APIs were completely obsolete and may mislead the direction: For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.
{
...
"TextDecoder": "The TextDecoder interface represents a decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.",
"TextEncoder": "TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.",
...
}
It's generated from 2214698 and outdated.
From #1841, unfortunately it looks like there's no system for automatic update on that file holding MDN descriptions. However, the README indicates that you shouldn't manually edit that file.
- `mdn/apiDescriptions.json`: a JSON file generated by fetching API descriptions from [MDN](https://developer.mozilla.org/en-US/docs/Web/API). **Do not edit this file**.
By any chance, would you allow updating those lines manually? I assume building an automated system to update those lines will require pretty much of effort and time.
I'm also leaving some related documents regarding StringView
here. By looking at those, I believe the whole spec concluded in encoding spec.
refs mdn/content#282
refs https://github.com/search?q=repo%3Amdn%2Ftranslated-content%20stringview&type=code
refs https://developer.mozilla.org.cach3.com/en-US/docs/Code_snippets/StringView