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

LibWeb: Give the DOM Window object a (weak) pointer to its JS wrapper

This commit is contained in:
Andreas Kling 2020-06-20 17:45:27 +02:00
parent 8194dfb9f4
commit cc5cba90db
4 changed files with 20 additions and 7 deletions

View file

@ -26,13 +26,16 @@
#pragma once
#include <AK/Weakable.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibWeb/Forward.h>
namespace Web {
namespace Bindings {
class WindowObject final : public JS::GlobalObject {
class WindowObject final
: public JS::GlobalObject
, public Weakable<WindowObject> {
public:
explicit WindowObject(Window&);
virtual void initialize() override;