| 
									
										
										
										
											2023-06-21 13:53:09 +02:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2023, Andreas Kling <kling@serenityos.org> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <LibWeb/DOM/Document.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Web::HTML { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // NOTE: This class is not currently in the specifications but it *is* implemented by all major browsers.
 | 
					
						
							|  |  |  | //       There is discussion about bringing it back:
 | 
					
						
							|  |  |  | //       https://github.com/whatwg/html/issues/4792
 | 
					
						
							|  |  |  | //       https://github.com/whatwg/dom/issues/221
 | 
					
						
							|  |  |  | class HTMLDocument final : public DOM::Document { | 
					
						
							|  |  |  |     JS_CELL(HTMLDocument, DOM::Document); | 
					
						
							| 
									
										
										
										
											2023-11-19 19:47:52 +01:00
										 |  |  |     JS_DECLARE_ALLOCATOR(HTMLDocument); | 
					
						
							| 
									
										
										
										
											2023-06-21 13:53:09 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     virtual ~HTMLDocument() override; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-13 13:05:26 +02:00
										 |  |  |     [[nodiscard]] static JS::NonnullGCPtr<HTMLDocument> create(JS::Realm&, AK::URL const& url = "about:blank"sv); | 
					
						
							| 
									
										
										
										
											2023-06-21 13:53:09 +02:00
										 |  |  |     WebIDL::ExceptionOr<JS::NonnullGCPtr<HTMLDocument>> construct_impl(JS::Realm&); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     HTMLDocument(JS::Realm&, AK::URL const&); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |