1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:07:43 +00:00
serenity/Libraries/LibWeb/Bindings
Nico Weber b9ce56aee6 LibWeb: Make btoa() and atob() correctly handle values between 128 and 255
btoa() takes a byte string, so it must decode the UTF-8 argument into
a Vector<u8> before calling encode_base64.

Likewise, in atob() decode_base64 returns a byte string, so that needs
to be converted to UTF-8.

With this, `btoa(String.fromCharCode(255))` is '/w==' as it should
be, and `atob(btoa(String.fromCharCode(255))) == String.fromCharCode(255)`
remains true.
2020-07-22 19:22:00 +02:00
..
EventListenerWrapper.cpp LibWeb: Split JS wrapper constructors into construct/initialize 2020-06-20 17:50:48 +02:00
EventListenerWrapper.h LibJS+LibWeb: Add JS::Object::inherits(class_name) 2020-06-21 15:15:52 +02:00
EventWrapperFactory.cpp LibWeb: Make wrapper factory functions take JS::GlobalObject& 2020-06-23 16:57:39 +02:00
EventWrapperFactory.h LibWeb: Make wrapper factory functions take JS::GlobalObject& 2020-06-23 16:57:39 +02:00
LocationObject.cpp LibJS: Clarify Object (base class) construction somewhat 2020-06-23 17:21:53 +02:00
LocationObject.h LibJS+LibWeb: Add JS::Object::inherits(class_name) 2020-06-21 15:15:52 +02:00
NavigatorObject.cpp LibJS: Clarify Object (base class) construction somewhat 2020-06-23 17:21:53 +02:00
NavigatorObject.h LibJS+LibWeb: Add JS::Object::inherits(class_name) 2020-06-21 15:15:52 +02:00
NodeWrapperFactory.cpp LibWeb: Implement quirks mode detection 2020-07-21 01:08:32 +02:00
NodeWrapperFactory.h LibWeb: Make wrapper factory functions take JS::GlobalObject& 2020-06-23 16:57:39 +02:00
WindowObject.cpp LibWeb: Make btoa() and atob() correctly handle values between 128 and 255 2020-07-22 19:22:00 +02:00
WindowObject.h LibWeb: Make DOM timers cancellable and stop leaking them 2020-06-27 20:02:04 +02:00
Wrappable.cpp LibWeb: Add missing copyright headers 2020-03-15 10:24:05 +01:00
Wrappable.h LibWeb: Use "namespace Web::Foo {" since C++20 allows it :^) 2020-07-21 16:23:08 +02:00
Wrapper.h LibWeb: Use "namespace Web::Foo {" since C++20 allows it :^) 2020-07-21 16:23:08 +02:00
XMLHttpRequestConstructor.cpp LibWeb: Use "namespace Web::Foo {" since C++20 allows it :^) 2020-07-21 16:23:08 +02:00
XMLHttpRequestConstructor.h LibWeb: Use "namespace Web::Foo {" since C++20 allows it :^) 2020-07-21 16:23:08 +02:00
XMLHttpRequestPrototype.cpp LibWeb: Use "namespace Web::Foo {" since C++20 allows it :^) 2020-07-21 16:23:08 +02:00
XMLHttpRequestPrototype.h LibWeb: Use "namespace Web::Foo {" since C++20 allows it :^) 2020-07-21 16:23:08 +02:00
XMLHttpRequestWrapper.cpp LibWeb: Use "namespace Web::Foo {" since C++20 allows it :^) 2020-07-21 16:23:08 +02:00
XMLHttpRequestWrapper.h LibWeb: Use "namespace Web::Foo {" since C++20 allows it :^) 2020-07-21 16:23:08 +02:00