mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:52:44 +00:00 
			
		
		
		
	LibWeb: Add Bindings::ScriptExecutionContext
This will be inherited by documents and workers, to provide a common abstraction for script execution. (We don't have workers yet, but we might as well make this little space for them now to simplify things down the road.)
This commit is contained in:
		
							parent
							
								
									976e55e942
								
							
						
					
					
						commit
						c6ae0c41d9
					
				
					 11 changed files with 100 additions and 8 deletions
				
			
		|  | @ -35,6 +35,7 @@ | |||
| #include <AK/WeakPtr.h> | ||||
| #include <LibCore/Forward.h> | ||||
| #include <LibJS/Forward.h> | ||||
| #include <LibWeb/Bindings/ScriptExecutionContext.h> | ||||
| #include <LibWeb/CSS/StyleResolver.h> | ||||
| #include <LibWeb/CSS/StyleSheet.h> | ||||
| #include <LibWeb/CSS/StyleSheetList.h> | ||||
|  | @ -51,7 +52,8 @@ enum class QuirksMode { | |||
| 
 | ||||
| class Document | ||||
|     : public ParentNode | ||||
|     , public NonElementParentNode<Document> { | ||||
|     , public NonElementParentNode<Document> | ||||
|     , public Bindings::ScriptExecutionContext { | ||||
| public: | ||||
|     using WrapperType = Bindings::DocumentWrapper; | ||||
| 
 | ||||
|  | @ -131,7 +133,7 @@ public: | |||
|     const String& source() const { return m_source; } | ||||
|     void set_source(const String& source) { m_source = source; } | ||||
| 
 | ||||
|     JS::Interpreter& interpreter(); | ||||
|     virtual JS::Interpreter& interpreter() override; | ||||
| 
 | ||||
|     JS::Value run_javascript(const StringView&); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling