This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://encoding.spec.whatwg.org/#interface-textencoder [[ If encoding is failure, or is none of utf-8, utf-16, and utf-16be, throw a "EncodingError". ]] I think it makes more sense to throw NotSupportedError here. Similarly for TextDecoder constructor's step 2.
sicking, jsbell, what do you guys think?
Actually, maybe we should throw the exception that is thrown for enums. I'm a bit hesitant to make both into an actual enum, but those are the semantics.
Which would be TypeError.
https://github.com/whatwg/encoding/commit/d32e3004d698fcba2e2361f00ae035a0a097b306 http://encoding.spec.whatwg.org/