mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +00:00
With so much infrastructure implemented, we can finally add the last piece of this puzzle - the fetch() method itself! This contains a few hundred lines of generated code as handling the RequestInfo and RequestInfo parameter types manually is not feasible, but we can't use the IDL definition as the Window object is handwritten code at the moment. It's neatly tucked away in Bindings/ and will be removed eventually.
19 lines
512 B
C++
19 lines
512 B
C++
/*
|
|
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Forward.h>
|
|
#include <LibJS/Forward.h>
|
|
#include <LibJS/Heap/GCPtr.h>
|
|
#include <LibWeb/Fetch/Request.h>
|
|
|
|
namespace Web::Fetch {
|
|
|
|
JS::NonnullGCPtr<JS::Promise> fetch_impl(JS::VM&, RequestInfo const& input, RequestInit const& init = {});
|
|
void abort_fetch(JS::VM&, JS::PromiseCapability const&, JS::NonnullGCPtr<Infrastructure::Request>, JS::GCPtr<Response>, JS::Value error);
|
|
|
|
}
|