[whatwg] Specs for window.atob() and window.btoa()
Jonas Sicking
jonas at sicking.cc
Sat Feb 5 17:29:13 PST 2011
On Sat, Feb 5, 2011 at 4:29 PM, Aryeh Gregor <Simetrical+w3c at gmail.com> wrote:
> On Fri, Feb 4, 2011 at 6:59 PM, Simon Pieters <simonp at opera.com> wrote:
>> Is the compat problem for not throwing for whitespace or for not throwing
>> for other garbage? If it's for other garbage, we could allow whitespace but
>> throw for other garbage. (The bugs I can find in our database with a quick
>> search is about non-ASCII characters not throwing.)
>
> Opera people were the only ones who told me about these compat
> problems, so it could be just non-ASCII characters. I went with
> Gecko's behavior exactly because it seemed simpler than WebKit's and I
> had been told Opera's wasn't fully web-compatible. Both Gecko and
> WebKit do throw on any whitespace.
>
>> Better performance seems like an incentive.
>
> I don't object to a spec change if browsers are willing to change
> their implementations. I'd be a bit surprised if these functions are
> widely used in performance-critical situations, though.
As a firefox developer, I'd be interested in avoiding throwing if it
can make things easier for authors (and it is web compatible).
So my first question is, can someone give examples of sources of
base64 data which contains whitespace?
I agree that this function probably doesn't appear in a lot of
performance critical code paths. However it might show up in places
which deal with large bodies of data, so if people can avoid cloning
that data unnecessarily then that's a win.
/ Jonas
More information about the whatwg
mailing list