mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
LibWeb: Give the DOM Window object a (weak) pointer to its JS wrapper
This commit is contained in:
parent
8194dfb9f4
commit
cc5cba90db
4 changed files with 20 additions and 7 deletions
|
@ -52,10 +52,16 @@ public:
|
|||
void did_set_location_href(Badge<Bindings::LocationObject>, const String& new_href);
|
||||
void did_call_location_reload(Badge<Bindings::LocationObject>);
|
||||
|
||||
Bindings::WindowObject* wrapper() { return m_wrapper; }
|
||||
const Bindings::WindowObject* wrapper() const { return m_wrapper; }
|
||||
|
||||
void set_wrapper(Badge<Bindings::WindowObject>, Bindings::WindowObject&);
|
||||
|
||||
private:
|
||||
explicit Window(Document&);
|
||||
|
||||
Document& m_document;
|
||||
WeakPtr<Bindings::WindowObject> m_wrapper;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue