1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-28 21:02:07 +00:00

LibWeb/HTML: Port Window.localStorage to IDL

This commit is contained in:
Linus Groh 2023-03-07 18:18:20 +00:00
parent 5cc6b1c4db
commit 37e9302dd9
4 changed files with 8 additions and 8 deletions

View file

@ -897,7 +897,6 @@ WebIDL::ExceptionOr<void> Window::initialize_web_interfaces(Badge<WindowEnvironm
define_direct_property("CSS", MUST_OR_THROW_OOM(heap().allocate<Bindings::CSSNamespace>(realm, realm)), 0);
define_native_accessor(realm, "localStorage", local_storage_getter, {}, attr);
define_native_accessor(realm, "sessionStorage", session_storage_getter, {}, attr);
// FIXME: Implement codegen for readonly properties with [PutForwards]
@ -1619,12 +1618,6 @@ JS_DEFINE_NATIVE_FUNCTION(Window::structured_clone)
}));
}
JS_DEFINE_NATIVE_FUNCTION(Window::local_storage_getter)
{
auto* impl = TRY(impl_from(vm));
return impl->local_storage();
}
JS_DEFINE_NATIVE_FUNCTION(Window::session_storage_getter)
{
auto* impl = TRY(impl_from(vm));