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

LibWeb: Shrink DOM::EventTarget by 80 bytes

Do this by converting two Function members into virtual functions:
- legacy_pre_activation_behavior
- legacy_cancelled_activation_behavior
This commit is contained in:
Andreas Kling 2022-02-18 20:40:12 +01:00
parent bfe69e9d0d
commit a97586c24a
2 changed files with 4 additions and 6 deletions

View file

@ -7,7 +7,6 @@
#pragma once
#include <AK/FlyString.h>
#include <AK/Function.h>
#include <AK/Noncopyable.h>
#include <AK/Vector.h>
#include <LibJS/Forward.h>
@ -50,8 +49,8 @@ public:
Function<void(const Event&)> activation_behavior;
// NOTE: These only exist for checkbox and radio input elements.
Function<void()> legacy_pre_activation_behavior;
Function<void()> legacy_cancelled_activation_behavior;
virtual void legacy_pre_activation_behavior() { }
virtual void legacy_cancelled_activation_behavior() { }
Bindings::CallbackType* event_handler_attribute(FlyString const& name);
void set_event_handler_attribute(FlyString const& name, Optional<Bindings::CallbackType>);