LibWeb: Add LocationObject::relevant_document()

https://html.spec.whatwg.org/multipage/history.html#relevant-document

> A Location object has an associated relevant Document, which is this
> Location object's relevant global object's browsing context's active
> document, if this Location object's relevant global object's browsing
> context is non-null, and null otherwise.
This commit is contained in:
Linus Groh 2022-03-05 00:15:36 +01:00 committed by Andreas Kling
commit da8525279e
Notes: sideshowbarker 2024-07-17 17:55:20 +09:00
2 changed files with 14 additions and 0 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -29,6 +30,8 @@ public:
// but we don't have the infrastructure in place to implement them yet.
private:
DOM::Document const* relevant_document() const;
JS_DECLARE_NATIVE_FUNCTION(reload);
JS_DECLARE_NATIVE_FUNCTION(replace);