mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-28 11:02:36 +00:00 
			
		
		
		
	 6e19ab2bbc
			
		
	
	
		6e19ab2bbc
		
	
	
	
	
		
			
			We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
		
			
				
	
	
		
			41 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, the SerenityOS developers.
 | |
|  * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibJS/Heap/GCPtr.h>
 | |
| #include <LibWeb/Bindings/PlatformObject.h>
 | |
| #include <LibWeb/DOM/Document.h>
 | |
| 
 | |
| namespace Web::DOM {
 | |
| 
 | |
| class DOMImplementation final : public Bindings::PlatformObject {
 | |
|     WEB_PLATFORM_OBJECT(DOMImplementation, Bindings::PlatformObject);
 | |
| 
 | |
| public:
 | |
|     static JS::NonnullGCPtr<DOMImplementation> create(Document&);
 | |
|     virtual ~DOMImplementation();
 | |
| 
 | |
|     WebIDL::ExceptionOr<JS::NonnullGCPtr<Document>> create_document(DeprecatedString const&, DeprecatedString const&, JS::GCPtr<DocumentType>) const;
 | |
|     JS::NonnullGCPtr<Document> create_html_document(DeprecatedString const& title) const;
 | |
|     WebIDL::ExceptionOr<JS::NonnullGCPtr<DocumentType>> create_document_type(DeprecatedString const& qualified_name, DeprecatedString const& public_id, DeprecatedString const& system_id);
 | |
| 
 | |
|     // https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
 | |
|     bool has_feature() const { return true; }
 | |
| 
 | |
| private:
 | |
|     explicit DOMImplementation(Document&);
 | |
| 
 | |
|     virtual void visit_edges(Cell::Visitor&) override;
 | |
| 
 | |
|     Document& document() { return m_document; }
 | |
|     Document const& document() const { return m_document; }
 | |
| 
 | |
|     Document& m_document;
 | |
| };
 | |
| 
 | |
| }
 |