mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:02:44 +00:00 
			
		
		
		
	 b91c49364d
			
		
	
	
		b91c49364d
		
	
	
	
	
		
			
			This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			654 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			654 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibWeb/HTML/HTMLElement.h>
 | |
| #include <LibWeb/HTML/SubmitEvent.h>
 | |
| 
 | |
| namespace Web::HTML {
 | |
| 
 | |
| NonnullRefPtr<SubmitEvent> SubmitEvent::create(const FlyString& event_name, RefPtr<HTMLElement> submitter)
 | |
| {
 | |
|     return adopt_ref(*new SubmitEvent(event_name, move(submitter)));
 | |
| }
 | |
| 
 | |
| SubmitEvent::SubmitEvent(const FlyString& event_name, RefPtr<HTMLElement> submitter)
 | |
|     : DOM::Event(event_name)
 | |
|     , m_submitter(submitter)
 | |
| {
 | |
| }
 | |
| 
 | |
| SubmitEvent::~SubmitEvent()
 | |
| {
 | |
| }
 | |
| 
 | |
| RefPtr<HTMLElement> SubmitEvent::submitter() const
 | |
| {
 | |
|     return m_submitter;
 | |
| }
 | |
| 
 | |
| }
 |