mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:42:43 +00:00 
			
		
		
		
	 b322abd8d0
			
		
	
	
		b322abd8d0
		
	
	
	
	
		
			
			SVGUseElement needs to be able to query the fully loaded document for its referenced element.
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			748 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			748 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibJS/Forward.h>
 | |
| #include <LibJS/SafeFunction.h>
 | |
| #include <LibWeb/Bindings/PlatformObject.h>
 | |
| #include <LibWeb/Forward.h>
 | |
| 
 | |
| namespace Web::DOM {
 | |
| 
 | |
| class DocumentObserver final : public Bindings::PlatformObject {
 | |
|     WEB_PLATFORM_OBJECT(DocumentObserver, Bindings::PlatformObject);
 | |
| 
 | |
| public:
 | |
|     JS::SafeFunction<void()> document_became_inactive;
 | |
|     JS::SafeFunction<void()> document_fully_loaded;
 | |
| 
 | |
| private:
 | |
|     explicit DocumentObserver(JS::Realm&, DOM::Document&);
 | |
| 
 | |
|     virtual void visit_edges(Cell::Visitor&) override;
 | |
|     virtual void finalize() override;
 | |
| 
 | |
|     JS::NonnullGCPtr<DOM::Document> m_document;
 | |
| };
 | |
| 
 | |
| }
 |