1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:47:34 +00:00

LibWeb: Fully implement the fragment serializing algorithm

Rather than assuming the node's node document is an HTML document,
handle XML documents as well.
This commit is contained in:
Timothy Flynn 2022-11-02 19:14:27 -04:00 committed by Linus Groh
parent e1ac9c83b2
commit 13b8eeff54
7 changed files with 19 additions and 13 deletions

View file

@ -13,6 +13,7 @@
#include <AK/TypeCasts.h>
#include <AK/Vector.h>
#include <LibWeb/DOM/EventTarget.h>
#include <LibWeb/DOMParsing/XMLSerializer.h>
#include <LibWeb/WebIDL/ExceptionOr.h>
namespace Web::DOM {
@ -196,7 +197,7 @@ public:
i32 id() const { return m_id; }
static Node* from_id(i32 node_id);
String serialize_fragment() const;
WebIDL::ExceptionOr<String> serialize_fragment(DOMParsing::RequireWellFormed) const;
void replace_all(JS::GCPtr<Node>);
void string_replace_all(String const&);