| 
									
										
										
										
											2023-04-22 14:39:20 -04:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <LibJS/Runtime/Realm.h>
 | 
					
						
							|  |  |  | #include <LibWeb/Bindings/Intrinsics.h>
 | 
					
						
							|  |  |  | #include <LibWeb/Bindings/MediaErrorPrototype.h>
 | 
					
						
							|  |  |  | #include <LibWeb/HTML/MediaError.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Web::HTML { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-19 19:47:52 +01:00
										 |  |  | JS_DEFINE_ALLOCATOR(MediaError); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-22 14:39:20 -04:00
										 |  |  | MediaError::MediaError(JS::Realm& realm, Code code, String message) | 
					
						
							|  |  |  |     : Base(realm) | 
					
						
							|  |  |  |     , m_code(code) | 
					
						
							|  |  |  |     , m_message(move(message)) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-07 08:41:28 +02:00
										 |  |  | void MediaError::initialize(JS::Realm& realm) | 
					
						
							| 
									
										
										
										
											2023-04-22 14:39:20 -04:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2023-08-07 08:41:28 +02:00
										 |  |  |     Base::initialize(realm); | 
					
						
							| 
									
										
										
										
											2023-11-22 12:55:21 +13:00
										 |  |  |     set_prototype(&Bindings::ensure_web_prototype<Bindings::MediaErrorPrototype>(realm, "MediaError"_fly_string)); | 
					
						
							| 
									
										
										
										
											2023-04-22 14:39:20 -04:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |