mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
Browser+WebContent+WebDriver: Move Get Page Source to WebContent
This commit is contained in:
parent
561f9f36f7
commit
88dcdf681f
16 changed files with 26 additions and 61 deletions
|
@ -263,20 +263,6 @@ void ConnectionFromClient::get_source()
|
|||
}
|
||||
}
|
||||
|
||||
Messages::WebContentServer::SerializeSourceResponse ConnectionFromClient::serialize_source()
|
||||
{
|
||||
if (auto* doc = page().top_level_browsing_context().active_document()) {
|
||||
auto result = doc->serialize_fragment(Web::DOMParsing::RequireWellFormed::Yes);
|
||||
if (!result.is_error())
|
||||
return { result.release_value() };
|
||||
|
||||
auto source = MUST(doc->serialize_fragment(Web::DOMParsing::RequireWellFormed::No));
|
||||
return { move(source) };
|
||||
}
|
||||
|
||||
return { {} };
|
||||
}
|
||||
|
||||
void ConnectionFromClient::inspect_dom_tree()
|
||||
{
|
||||
if (auto* doc = page().top_level_browsing_context().active_document()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue