1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +00:00

LibWeb: Add BrowsingContext::container_document()

This is the "browsing context container document" from the spec.
This commit is contained in:
Andreas Kling 2021-09-09 02:10:05 +02:00
parent d1100dd6bc
commit 71d7c8a353
2 changed files with 17 additions and 0 deletions

View file

@ -348,4 +348,18 @@ bool BrowsingContext::decrement_cursor_position_offset()
return true;
}
DOM::Document* BrowsingContext::container_document()
{
if (auto* container = this->container())
return &container->document();
return nullptr;
}
DOM::Document const* BrowsingContext::container_document() const
{
if (auto* container = this->container())
return &container->document();
return nullptr;
}
}