1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

LibWeb/Fetch: Add duplex property to Request

This is a change in the Fetch spec.

See: 1fbc40c
This commit is contained in:
Linus Groh 2022-10-15 00:41:10 +02:00
parent 60e9790a40
commit 5995a9fd06
3 changed files with 10 additions and 0 deletions

View file

@ -6,6 +6,7 @@
#include <AK/URLParser.h>
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/Bindings/RequestPrototype.h>
#include <LibWeb/DOM/AbortSignal.h>
#include <LibWeb/Fetch/Enums.h>
#include <LibWeb/Fetch/Headers.h>
@ -611,6 +612,13 @@ JS::NonnullGCPtr<DOM::AbortSignal> Request::signal() const
return *m_signal;
}
// https://fetch.spec.whatwg.org/#dom-request-duplex
Bindings::RequestDuplex Request::duplex() const
{
// The duplex getter steps are to return "half".
return Bindings::RequestDuplex::Half;
}
// https://fetch.spec.whatwg.org/#dom-request-clone
WebIDL::ExceptionOr<JS::NonnullGCPtr<Request>> Request::clone() const
{