mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
LibWeb/HTML: Port Window.sessionStorage to IDL
This commit is contained in:
@@ -897,8 +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, "sessionStorage", session_storage_getter, {}, attr);
|
||||
|
||||
// FIXME: Implement codegen for readonly properties with [PutForwards]
|
||||
auto& location_accessor = storage_get("location")->value.as_accessor();
|
||||
location_accessor.set_setter(JS::NativeFunction::create(realm, location_setter, 1, "location", &realm, {}, "set"sv));
|
||||
@@ -1618,10 +1616,4 @@ JS_DEFINE_NATIVE_FUNCTION(Window::structured_clone)
|
||||
}));
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_FUNCTION(Window::session_storage_getter)
|
||||
{
|
||||
auto* impl = TRY(impl_from(vm));
|
||||
return impl->session_storage();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user