diff --git a/Userland/Libraries/LibWeb/HTML/Window.cpp b/Userland/Libraries/LibWeb/HTML/Window.cpp
index d7eca709a6..cedc08f3fa 100644
--- a/Userland/Libraries/LibWeb/HTML/Window.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Window.cpp
@@ -897,8 +897,6 @@ WebIDL::ExceptionOr Window::initialize_web_interfaces(Badge(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();
-}
-
}
diff --git a/Userland/Libraries/LibWeb/HTML/Window.h b/Userland/Libraries/LibWeb/HTML/Window.h
index df9f22e31b..4cbc962f6d 100644
--- a/Userland/Libraries/LibWeb/HTML/Window.h
+++ b/Userland/Libraries/LibWeb/HTML/Window.h
@@ -253,8 +253,6 @@ private:
JS_DECLARE_NATIVE_FUNCTION(structured_clone);
- JS_DECLARE_NATIVE_FUNCTION(session_storage_getter);
-
JS_DECLARE_NATIVE_FUNCTION(set_interval);
JS_DECLARE_NATIVE_FUNCTION(set_timeout);
JS_DECLARE_NATIVE_FUNCTION(clear_interval);
diff --git a/Userland/Libraries/LibWeb/HTML/Window.idl b/Userland/Libraries/LibWeb/HTML/Window.idl
index 48f42dd438..c605544a9e 100644
--- a/Userland/Libraries/LibWeb/HTML/Window.idl
+++ b/Userland/Libraries/LibWeb/HTML/Window.idl
@@ -9,6 +9,7 @@
#import
#import
#import
+#import
#import
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#window
@@ -98,6 +99,7 @@ Window includes AnimationFrameProvider;
Window includes GlobalEventHandlers;
Window includes WindowEventHandlers;
Window includes WindowLocalStorage;
+Window includes WindowSessionStorage;
Window includes WindowOrWorkerGlobalScope;
enum ScrollBehavior { "auto", "instant", "smooth" };
diff --git a/Userland/Libraries/LibWeb/HTML/WindowSessionStorage.idl b/Userland/Libraries/LibWeb/HTML/WindowSessionStorage.idl
new file mode 100644
index 0000000000..b1dfe3ce02
--- /dev/null
+++ b/Userland/Libraries/LibWeb/HTML/WindowSessionStorage.idl
@@ -0,0 +1,6 @@
+#import
+
+// https://html.spec.whatwg.org/multipage/webstorage.html#windowsessionstorage
+interface mixin WindowSessionStorage {
+ readonly attribute Storage sessionStorage;
+};