mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
LibXML+LibWeb: Store the XML document's original source
Similar to how we store an HTML document's original source. This allows the source to be inspected with "View Source" in the Browser.
This commit is contained in:
parent
e7412717b4
commit
b10bbac061
Notes:
sideshowbarker
2024-07-17 04:50:07 +09:00
Author: https://github.com/trflynn89
Commit: b10bbac061
Pull-request: https://github.com/SerenityOS/serenity/pull/15905
Reviewed-by: https://github.com/alimpfard ✅
Reviewed-by: https://github.com/linusg ✅
4 changed files with 8 additions and 0 deletions
|
@ -174,6 +174,7 @@ ErrorOr<void, ParseError> Parser::parse_with_listener(Listener& listener)
|
|||
{
|
||||
m_listener = &listener;
|
||||
ScopeGuard unset_listener { [this] { m_listener = nullptr; } };
|
||||
m_listener->set_source(m_source);
|
||||
m_listener->document_start();
|
||||
auto result = parse_internal();
|
||||
if (result.is_error())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue