1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

LibWeb: Update Window::name() to use navigables

This commit is contained in:
Aliaksandr Kalenik 2023-09-07 13:03:56 +02:00 committed by Andreas Kling
parent 5d12dea4c9
commit 6736a76915

View file

@ -818,11 +818,11 @@ JS::NonnullGCPtr<DOM::Document const> Window::document() const
String Window::name() const
{
// 1. If this's navigable is null, then return the empty string.
if (!browsing_context())
if (!navigable())
return String {};
// 2. Return this's navigable's target name.
return browsing_context()->name();
return navigable()->target_name();
}
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#apis-for-creating-and-navigating-browsing-contexts-by-name:dom-name