mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb/HTML: Port Window.fetch() to IDL
This commit is contained in:
parent
a2fb3a1653
commit
5cc6b1c4db
Notes:
sideshowbarker
2024-07-16 23:17:55 +09:00
Author: https://github.com/linusg
Commit: 5cc6b1c4db
Pull-request: https://github.com/SerenityOS/serenity/pull/17752
Reviewed-by: https://github.com/awesomekling
12 changed files with 22 additions and 389 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <AK/Utf8View.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibTextCodec/Decoder.h>
|
||||
#include <LibWeb/Fetch/FetchMethod.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/HTML/WindowOrWorkerGlobalScope.h>
|
||||
#include <LibWeb/Infra/Base64.h>
|
||||
|
@ -83,4 +84,10 @@ WebIDL::ExceptionOr<String> WindowOrWorkerGlobalScopeMixin::atob(String const& d
|
|||
return TRY_OR_THROW_OOM(vm, decoder->to_utf8(decoded_data.value()));
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<JS::Promise> WindowOrWorkerGlobalScopeMixin::fetch(Fetch::RequestInfo const& input, Fetch::RequestInit const& init) const
|
||||
{
|
||||
auto& vm = this_impl().vm();
|
||||
return Fetch::fetch(vm, input, init);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue