mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:22:45 +00:00 
			
		
		
		
	LibWeb: Move XHR::FormDataEntry to its own header
This avoids a circular dependency in a future commit
This commit is contained in:
		
							parent
							
								
									d97b09693e
								
							
						
					
					
						commit
						a83668d838
					
				
					 2 changed files with 25 additions and 8 deletions
				
			
		|  | @ -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); | ||||
|  |  | |||
							
								
								
									
										24
									
								
								Userland/Libraries/LibWeb/XHR/FormDataEntry.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								Userland/Libraries/LibWeb/XHR/FormDataEntry.h
									
										
									
									
									
										Normal 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; | ||||
| }; | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andrew Kaster
						Andrew Kaster