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

LibWeb: Use the WRAPPER_HACK() macro instead of hand-coding wrap()

This macro will soon go away, but let's start by replacing all the
hand-coded versions of wrap() with this macro that expands to the same
exact thing.
This commit is contained in:
Andreas Kling 2022-09-04 21:48:07 +02:00
parent bc74909308
commit 45425de849
17 changed files with 17 additions and 68 deletions

View file

@ -47,7 +47,4 @@ protected:
}
namespace Web::Bindings {
inline JS::Object* wrap(JS::Realm&, Web::DOM::AbstractRange& object) { return &object; }
using AbstractRangeWrapper = Web::DOM::AbstractRange;
}
WRAPPER_HACK(AbstractRange, Web::DOM)

View file

@ -42,7 +42,4 @@ private:
}
namespace Web::Bindings {
inline JS::Object* wrap(JS::Realm&, Web::DOM::CustomEvent& object) { return &object; }
using CustomEventWrapper = Web::DOM::CustomEvent;
}
WRAPPER_HACK(CustomEvent, Web::DOM)

View file

@ -43,7 +43,4 @@ private:
}
namespace Web::Bindings {
inline JS::Object* wrap(JS::Realm&, Web::DOM::IDLEventListener& object) { return &object; }
using EventListenerWrapper = Web::DOM::IDLEventListener;
}
WRAPPER_HACK(IDLEventListener, Web::DOM)

View file

@ -97,7 +97,4 @@ private:
}
namespace Web::Bindings {
inline JS::Object* wrap(JS::Realm&, Web::DOM::Range& object) { return &object; }
using RangeWrapper = Web::DOM::Range;
}
WRAPPER_HACK(Range, Web::DOM)

View file

@ -32,7 +32,4 @@ public:
}
namespace Web::Bindings {
inline JS::Object* wrap(JS::Realm&, Web::DOM::StaticRange& object) { return &object; }
using StaticRangeWrapper = Web::DOM::StaticRange;
}
WRAPPER_HACK(StaticRange, Web::DOM)