1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

LibWeb: Implement XMLSerializer

The main thing that is missing is validating certain pieces of data
against XML productions in well-formed mode, but nothing uses
well-formed mode right now.

Required by Closure Library for sanitising HTML.
e687b3d8ab/closure/goog/html/sanitizer/safedomtreeprocessor.js (L117)
This commit is contained in:
Luke Wilde 2022-07-05 18:59:45 +01:00 committed by Andreas Kling
parent 60fc0ceabb
commit de88e119a0
10 changed files with 938 additions and 1 deletions

View file

@ -355,6 +355,8 @@
#include <LibWeb/Bindings/XMLHttpRequestEventTargetConstructor.h>
#include <LibWeb/Bindings/XMLHttpRequestEventTargetPrototype.h>
#include <LibWeb/Bindings/XMLHttpRequestPrototype.h>
#include <LibWeb/Bindings/XMLSerializerConstructor.h>
#include <LibWeb/Bindings/XMLSerializerPrototype.h>
#define ADD_WINDOW_OBJECT_CONSTRUCTOR_AND_PROTOTYPE(interface_name, constructor_name, prototype_name) \
{ \
@ -539,6 +541,7 @@
ADD_WINDOW_OBJECT_INTERFACE(Worker) \
ADD_WINDOW_OBJECT_INTERFACE(XMLHttpRequest) \
ADD_WINDOW_OBJECT_INTERFACE(XMLHttpRequestEventTarget) \
ADD_WINDOW_OBJECT_INTERFACE(XMLSerializer) \
ADD_WINDOW_OBJECT_INTERFACE(Window) \
ADD_WINDOW_OBJECT_CONSTRUCTOR_AND_PROTOTYPE(Audio, AudioConstructor, HTMLAudioElementPrototype) \
ADD_WINDOW_OBJECT_CONSTRUCTOR_AND_PROTOTYPE(Image, ImageConstructor, HTMLImageElementPrototype) \