
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
36 lines
870 B
C++
36 lines
870 B
C++
/*
|
|
* Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/Bindings/PlatformObject.h>
|
|
|
|
namespace Web::DOMParsing {
|
|
|
|
class XMLSerializer final : public Bindings::PlatformObject {
|
|
WEB_PLATFORM_OBJECT(XMLSerializer, Bindings::PlatformObject);
|
|
GC_DECLARE_ALLOCATOR(XMLSerializer);
|
|
|
|
public:
|
|
static WebIDL::ExceptionOr<GC::Ref<XMLSerializer>> construct_impl(JS::Realm&);
|
|
|
|
virtual ~XMLSerializer() override;
|
|
|
|
WebIDL::ExceptionOr<String> serialize_to_string(GC::Ref<DOM::Node const> root);
|
|
|
|
private:
|
|
explicit XMLSerializer(JS::Realm&);
|
|
|
|
virtual void initialize(JS::Realm&) override;
|
|
};
|
|
|
|
enum class RequireWellFormed {
|
|
No,
|
|
Yes,
|
|
};
|
|
|
|
WebIDL::ExceptionOr<String> serialize_node_to_xml_string(GC::Ref<DOM::Node const> root, RequireWellFormed require_well_formed);
|
|
}
|