mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Stub CacheStorage::has()
This is a step to get https://web.telegram.org/a/ login working.
This commit is contained in:
parent
f5de4c3dd6
commit
d8c86a2b09
Notes:
github-actions[bot]
2025-06-08 16:27:26 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: d8c86a2b09
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5032
Reviewed-by: https://github.com/shannonbooth
Reviewed-by: https://github.com/trflynn89
3 changed files with 9 additions and 1 deletions
|
@ -30,4 +30,11 @@ GC::Ref<WebIDL::Promise> CacheStorage::open(String const&)
|
|||
return WebIDL::create_rejected_promise(realm(), WebIDL::NotSupportedError::create(realm(), "CacheStorage.open() is not yet implemented"_string));
|
||||
}
|
||||
|
||||
// https://w3c.github.io/ServiceWorker/#cache-storage-has
|
||||
GC::Ref<WebIDL::Promise> CacheStorage::has(String const&)
|
||||
{
|
||||
dbgln("FIXME: CacheStorage::has() is not implemented yet");
|
||||
return WebIDL::create_rejected_promise(realm(), JS::Value(false));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ class CacheStorage : public Bindings::PlatformObject {
|
|||
GC_DECLARE_ALLOCATOR(CacheStorage);
|
||||
|
||||
public:
|
||||
GC::Ref<WebIDL::Promise> has(String const& cache_name);
|
||||
GC::Ref<WebIDL::Promise> open(String const& cache_name);
|
||||
|
||||
private:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface CacheStorage {
|
||||
//[NewObject] Promise<(Response or undefined)> match(RequestInfo request, optional MultiCacheQueryOptions options = {});
|
||||
//[NewObject] Promise<boolean> has(DOMString cacheName);
|
||||
[NewObject] Promise<boolean> has(DOMString cacheName);
|
||||
[NewObject] Promise<Cache> open(DOMString cacheName);
|
||||
//[NewObject] Promise<boolean> delete(DOMString cacheName);
|
||||
//[NewObject] Promise<sequence<DOMString>> keys();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue