LibWeb: Set doctype node immediately while parsing XML document

Instead of deferring it to the end of parsing, where scripts that
were expecting to look at the doctype may have already run.
This commit is contained in:
Andreas Kling 2024-11-20 11:43:20 +01:00 committed by Andreas Kling
commit cd446e5e9c
Notes: github-actions[bot] 2024-11-20 15:11:55 +00:00
6 changed files with 66 additions and 9 deletions

View file

@ -31,7 +31,7 @@ public:
private:
virtual void set_source(ByteString) override;
virtual void set_doctype(XML::Doctype) override;
virtual void doctype(XML::Doctype const&) override;
virtual void element_start(XML::Name const& name, HashMap<XML::Name, ByteString> const& attributes) override;
virtual void element_end(XML::Name const& name) override;
virtual void text(StringView data) override;