LibWeb/CSS: FontFaceSet extends EventTarget

This commit is contained in:
Jamie Mansfield 2024-06-06 19:55:53 +01:00 committed by Nico Weber
parent f99508a53a
commit c171c9a6ec
3 changed files with 5 additions and 3 deletions

View file

@ -39,7 +39,7 @@ JS::NonnullGCPtr<FontFaceSet> FontFaceSet::create(JS::Realm& realm)
}
FontFaceSet::FontFaceSet(JS::Realm& realm, JS::NonnullGCPtr<WebIDL::Promise> ready_promise, JS::NonnullGCPtr<JS::Set> set_entries)
: Bindings::PlatformObject(realm)
: DOM::EventTarget(realm)
, m_set_entries(set_entries)
, m_ready_promise(ready_promise)
{

View file

@ -11,11 +11,12 @@
#include <LibWeb/Bindings/FontFaceSetPrototype.h>
#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/CSS/FontFace.h>
#include <LibWeb/DOM/EventTarget.h>
namespace Web::CSS {
class FontFaceSet final : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(FontFaceSet, Bindings::PlatformObject);
class FontFaceSet final : public DOM::EventTarget {
WEB_PLATFORM_OBJECT(FontFaceSet, DOM::EventTarget);
JS_DECLARE_ALLOCATOR(FontFaceSet);
public:

View file

@ -1,4 +1,5 @@
#import <CSS/FontFace.idl>
#import <DOM/EventTarget.idl>
dictionary FontFaceSetLoadEventInit : EventInit {
sequence<FontFace> fontfaces = [];