mirror of
https://github.com/zebrajr/ladybird.git
synced 2026-01-15 12:15:15 +00:00
LibWeb: Correctly transform EncapsulatedKey into an ECMAScript object
The spec prefers camel case, but we internally use snake case.
This commit is contained in:
@@ -280,7 +280,7 @@ JS::ThrowCompletionOr<GC::Ref<JS::Object>> EncapsulatedKey::to_object(JS::Realm&
|
||||
auto object = JS::Object::create(realm, realm.intrinsics().object_prototype());
|
||||
|
||||
if (shared_key.has_value())
|
||||
TRY(object->create_data_property("shared_key"_utf16_fly_string, shared_key.value()));
|
||||
TRY(object->create_data_property("sharedKey"_utf16_fly_string, shared_key.value()));
|
||||
|
||||
if (ciphertext.has_value())
|
||||
TRY(object->create_data_property("ciphertext"_utf16_fly_string, JS::ArrayBuffer::create(realm, ciphertext.value())));
|
||||
@@ -293,7 +293,7 @@ JS::ThrowCompletionOr<GC::Ref<JS::Object>> EncapsulatedBits::to_object(JS::Realm
|
||||
auto object = JS::Object::create(realm, realm.intrinsics().object_prototype());
|
||||
|
||||
if (shared_key.has_value())
|
||||
TRY(object->create_data_property("shared_key"_utf16_fly_string, JS::ArrayBuffer::create(realm, shared_key.value())));
|
||||
TRY(object->create_data_property("sharedKey"_utf16_fly_string, JS::ArrayBuffer::create(realm, shared_key.value())));
|
||||
|
||||
if (ciphertext.has_value())
|
||||
TRY(object->create_data_property("ciphertext"_utf16_fly_string, JS::ArrayBuffer::create(realm, ciphertext.value())));
|
||||
|
||||
Reference in New Issue
Block a user