mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-01 05:41:01 +00:00 
			
		
		
		
	LibWeb: Support "importmap" scripts
This commit is contained in:
		
							parent
							
								
									ccb363c443
								
							
						
					
					
						commit
						e487f70bbf
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-18 04:46:35 +09:00 
				
			
			Author: https://github.com/jamierocks
Commit: e487f70bbf
Pull-request: https://github.com/SerenityOS/serenity/pull/23954
Issue: https://github.com/SerenityOS/serenity/issues/23117
			
					 13 changed files with 402 additions and 9 deletions
				
			
		|  | @ -10,6 +10,7 @@ | |||
| #include <LibWeb/DOM/DocumentLoadEventDelayer.h> | ||||
| #include <LibWeb/HTML/CORSSettingAttribute.h> | ||||
| #include <LibWeb/HTML/HTMLElement.h> | ||||
| #include <LibWeb/HTML/Scripting/ImportMapParseResult.h> | ||||
| #include <LibWeb/HTML/Scripting/Script.h> | ||||
| #include <LibWeb/ReferrerPolicy/ReferrerPolicy.h> | ||||
| 
 | ||||
|  | @ -47,7 +48,7 @@ public: | |||
|     // https://html.spec.whatwg.org/multipage/scripting.html#dom-script-supports
 | ||||
|     static bool supports(JS::VM&, StringView type) | ||||
|     { | ||||
|         return type.is_one_of("classic"sv, "module"sv); | ||||
|         return type.is_one_of("classic"sv, "module"sv, "importmap"sv); | ||||
|     } | ||||
| 
 | ||||
|     void set_source_line_number(Badge<HTMLParser>, size_t source_line_number) { m_source_line_number = source_line_number; } | ||||
|  | @ -81,7 +82,7 @@ private: | |||
|         struct Null { }; | ||||
|     }; | ||||
| 
 | ||||
|     using Result = Variant<ResultState::Uninitialized, ResultState::Null, JS::NonnullGCPtr<HTML::Script>>; | ||||
|     using Result = Variant<ResultState::Uninitialized, ResultState::Null, JS::NonnullGCPtr<HTML::Script>, JS::NonnullGCPtr<HTML::ImportMapParseResult>>; | ||||
| 
 | ||||
|     // https://html.spec.whatwg.org/multipage/scripting.html#mark-as-ready
 | ||||
|     void mark_as_ready(Result); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jamie Mansfield
						Jamie Mansfield