mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:22:46 +00:00 
			
		
		
		
	LibWeb: Add the URL::searchParams attribute
This commit is contained in:
		
							parent
							
								
									1841fbd3e4
								
							
						
					
					
						commit
						fe32c9c3bd
					
				
					 5 changed files with 15 additions and 1 deletions
				
			
		|  | @ -1481,6 +1481,7 @@ void generate_prototype_implementation(IDL::Interface const& interface) | |||
| #include <LibWeb/Bindings/RangeWrapper.h> | ||||
| #include <LibWeb/Bindings/StyleSheetListWrapper.h> | ||||
| #include <LibWeb/Bindings/TextWrapper.h> | ||||
| #include <LibWeb/Bindings/URLSearchParamsWrapper.h> | ||||
| #include <LibWeb/Bindings/WindowObject.h> | ||||
| #include <LibWeb/DOM/Element.h> | ||||
| #include <LibWeb/DOM/EventListener.h> | ||||
|  |  | |||
|  | @ -75,4 +75,9 @@ DOM::ExceptionOr<void> URL::set_href(String const& href) | |||
|     return {}; | ||||
| } | ||||
| 
 | ||||
| URLSearchParams const* URL::search_params() const | ||||
| { | ||||
|     return m_query; | ||||
| } | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -31,6 +31,8 @@ public: | |||
|     String href() const; | ||||
|     DOM::ExceptionOr<void> set_href(String const&); | ||||
| 
 | ||||
|     URLSearchParams const* search_params() const; | ||||
| 
 | ||||
|     String to_json() const; | ||||
| 
 | ||||
|     void set_query(Badge<URLSearchParams>, String query) { m_url.set_query(move(query)); } | ||||
|  |  | |||
|  | @ -11,7 +11,7 @@ interface URL { | |||
|     // TODO: attribute USVString port; | ||||
|     // TODO: attribute USVString pathname; | ||||
|     // TODO: attribute USVString search; | ||||
|     // TODO: [SameObject] readonly attribute URLSearchParams searchParams; | ||||
|     [SameObject] readonly attribute URLSearchParams searchParams; | ||||
|     // TODO: attribute USVString hash; | ||||
| 
 | ||||
|     USVString toJSON(); | ||||
|  |  | |||
|  | @ -55,3 +55,9 @@ private: | |||
| }; | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| namespace Web::Bindings { | ||||
| 
 | ||||
| URLSearchParamsWrapper* wrap(JS::GlobalObject&, URL::URLSearchParams&); | ||||
| 
 | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Idan Horowitz
						Idan Horowitz