Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the TextDecoder and TextEncoder APIs #4

Closed
SimonSapin opened this issue Aug 15, 2013 · 2 comments
Closed

Remove the TextDecoder and TextEncoder APIs #4

SimonSapin opened this issue Aug 15, 2013 · 2 comments

Comments

@SimonSapin
Copy link
Collaborator

Hi,

If #3 is resolved and the spec’s error handling behavior can be obtained with the "normal" API, I believe that the TextDecoder and TextEncoder APIs should be removed. The reasons are:

  • It doesn’t seem to do anything useful that the rest of the API doesn’t already do.
  • The spec says "Non-browser implementations are not required to implement this API."
  • It is designed for JavaScript (options dicts, TypeError, …) and doesn’t translate well into Rust.
  • I don’t personally find it very good anyway.

Instead, the get_encoding() function should be public. It is useful anyway when dealing with multiple encoding hints. (See for example the relevant CSS spec)

@lifthrasiir
Copy link
Owner

For now please see my comment in #3. By the way, thank you for pointing that spec, I agree on your thought on the encoding enumeration API.

@lifthrasiir
Copy link
Owner

They are gone as of 3025543.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants