1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
ladybird/Libraries/LibWeb/ServiceWorker/CacheStorage.h
Aliaksandr Kalenik 7efdd1c1ec LibWeb: Stub CacheStorage interface
With this change we can again open login form https://discord.com/login
instead of failing in js because `caches.open()` is not defined.
2025-06-05 23:02:21 +02:00

28 lines
650 B
C++

/*
* Copyright (c) 2025, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/WebIDL/Promise.h>
namespace Web::ServiceWorker {
// https://w3c.github.io/ServiceWorker/#cachestorage-interface
class CacheStorage : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(CacheStorage, Bindings::PlatformObject);
GC_DECLARE_ALLOCATOR(CacheStorage);
public:
GC::Ref<WebIDL::Promise> open(String const& cache_name);
private:
explicit CacheStorage(JS::Realm&);
virtual void initialize(JS::Realm&) override;
};
}