mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:42:44 +00:00 
			
		
		
		
	 4270ede7c4
			
		
	
	
		4270ede7c4
		
	
	
	
	
		
			
			We no longer access Bindings::FooWrapper anywhere for a Foo platform object, so these can be removed :^)
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			957 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			957 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibWeb/Bindings/PlatformObject.h>
 | |
| #include <LibWeb/DOM/AbortSignal.h>
 | |
| 
 | |
| namespace Web::DOM {
 | |
| 
 | |
| // https://dom.spec.whatwg.org/#abortcontroller
 | |
| class AbortController final : public Bindings::PlatformObject {
 | |
|     WEB_PLATFORM_OBJECT(AbortController, Bindings::PlatformObject);
 | |
| 
 | |
| public:
 | |
|     static JS::NonnullGCPtr<AbortController> create_with_global_object(HTML::Window&);
 | |
| 
 | |
|     virtual ~AbortController() override;
 | |
| 
 | |
|     // https://dom.spec.whatwg.org/#dom-abortcontroller-signal
 | |
|     JS::NonnullGCPtr<AbortSignal> signal() const { return *m_signal; }
 | |
| 
 | |
|     void abort(JS::Value reason);
 | |
| 
 | |
| private:
 | |
|     AbortController(HTML::Window&, JS::NonnullGCPtr<AbortSignal>);
 | |
| 
 | |
|     virtual void visit_edges(Cell::Visitor&) override;
 | |
| 
 | |
|     // https://dom.spec.whatwg.org/#abortcontroller-signal
 | |
|     JS::NonnullGCPtr<AbortSignal> m_signal;
 | |
| };
 | |
| 
 | |
| }
 |