1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:44:58 +00:00

LibWeb: Move XHR::FormDataEntry to its own header

This avoids a circular dependency in a future commit
This commit is contained in:
Andrew Kaster 2023-08-28 17:38:05 +02:00 committed by Alexander Kalenik
parent d97b09693e
commit a83668d838
2 changed files with 25 additions and 8 deletions

View file

@ -11,17 +11,10 @@
#include <LibWeb/Forward.h>
#include <LibWeb/HTML/HTMLFormElement.h>
#include <LibWeb/WebIDL/ExceptionOr.h>
#include <LibWeb/XHR/FormDataEntry.h>
namespace Web::XHR {
// https://xhr.spec.whatwg.org/#formdataentryvalue
using FormDataEntryValue = Variant<JS::Handle<FileAPI::File>, String>;
struct FormDataEntry {
String name;
FormDataEntryValue value;
};
// https://xhr.spec.whatwg.org/#interface-formdata
class FormData : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(FormData, Bindings::PlatformObject);

View file

@ -0,0 +1,24 @@
/*
* Copyright (c) 2023, Kenneth Myhra <kennethmyhra@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/String.h>
#include <AK/Variant.h>
#include <LibJS/Heap/Handle.h>
#include <LibWeb/Forward.h>
namespace Web::XHR {
// https://xhr.spec.whatwg.org/#formdataentryvalue
using FormDataEntryValue = Variant<JS::Handle<FileAPI::File>, String>;
struct FormDataEntry {
String name;
FormDataEntryValue value;
};
}