1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibWeb: Implement the window.opener attribute

This returns a reference to the window that opened the current window.
This commit is contained in:
Tim Ledbetter 2024-03-12 23:39:59 +00:00 committed by Sam Atkins
parent 5713c2ffdd
commit fc1f037cd1
5 changed files with 63 additions and 0 deletions

View file

@ -144,6 +144,8 @@ public:
JS::NonnullGCPtr<WindowProxy> frames() const;
u32 length();
JS::GCPtr<WindowProxy const> top() const;
JS::GCPtr<WindowProxy const> opener() const;
WebIDL::ExceptionOr<void> set_opener(JS::Value);
JS::GCPtr<WindowProxy const> parent() const;
JS::GCPtr<DOM::Element const> frame_element() const;
WebIDL::ExceptionOr<JS::GCPtr<WindowProxy>> open(Optional<String> const& url, Optional<String> const& target, Optional<String> const& features);