[whatwg] atob/btoa need to be defined

Boris Zbarsky bzbarsky at MIT.EDU
Wed Aug 25 20:00:11 PDT 2010


On 8/25/10 10:04 PM, Kevin Benson wrote:
>     Of course I can't find any actual spec for atob/btoa.  I would think
>     it needs to be part of the Window spec, no?
>
> https://developer.mozilla.org/en/DOM/window.atob
> https://developer.mozilla.org/en/DOM/window.btoa

That's not a spec (unless you also consider CSS1 and HTML2 specs). 
That's a vague tutorial.  For example, neither page mentions anything 
about exceptions being thrown for some inputs (which from code 
inspection I can assure you they are).  Neither page says anything about 
how the encoding and decoding is actually performed, furthermore 
("base64 encoding" does not have unique output for a given input, though 
"base64 decoding" something that was "base64 encoded" will in fact give 
the original data).

Seriously, this needs a spec.

-Boris



More information about the whatwg mailing list