diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-18 12:15:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-18 12:18:29 +0100 |
commit | 0639e778986877ef0a6883eb9011ad8b4f56b642 (patch) | |
tree | 32afd1a67fa823a59d25e4181c3503471b63c8f6 /Kernel/Scheduler.h | |
parent | fd83918476dd4d91a07df44c831275f0b5cdd7e9 (diff) | |
download | serenity-0639e778986877ef0a6883eb9011ad8b4f56b642.zip |
LibWeb: Make the Window object "inherit" from EventTarget :^)
Since Web::Bindings::WindowObject inherits from JS::GlobalObject, it
cannot also inherit from Web::Bindings::EventTargetWrapper.
However, that's not actually necessary. Instead, we simply set the
Window object's prototype to the EventTargetPrototype, and add a little
extra branch in the impl_from() function that turns the JS "this" value
into a DOM::EventTarget*.
With this, you can now call window.addEventListener()! Very cool :^)
Fixes #4758.
Diffstat (limited to 'Kernel/Scheduler.h')
0 files changed, 0 insertions, 0 deletions