LibWeb: Allow TrackEvent track to be a TextTrack

Fixes two FIXMEs :^)
This commit is contained in:
Jamie Mansfield 2024-07-05 18:57:29 +01:00 committed by Andreas Kling
commit ab91a616b8
Notes: sideshowbarker 2024-07-17 20:33:50 +09:00
3 changed files with 6 additions and 7 deletions

View file

@ -34,7 +34,7 @@ void TrackEvent::initialize(JS::Realm& realm)
WEB_SET_PROTOTYPE_FOR_INTERFACE(TrackEvent);
}
Variant<Empty, JS::Handle<VideoTrack>, JS::Handle<AudioTrack>> TrackEvent::track() const
Variant<Empty, JS::Handle<VideoTrack>, JS::Handle<AudioTrack>, JS::Handle<TextTrack>> TrackEvent::track() const
{
// FIXME: This is a bit awkward. When creating a nullable union, our IDL generator creates a type of
// Optional<Variant<...>>, using an empty Optional to represent null. But when retrieving the