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:
parent
5d12dea4c9
commit
6736a76915
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue