mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb/HTML: Implement TextTrack.mode
This commit is contained in:
parent
97436e7d65
commit
4b16f1df05
Notes:
github-actions[bot]
2024-07-26 07:31:18 +00:00
Author: https://github.com/jamierocks
Commit: 4b16f1df05
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/836
3 changed files with 17 additions and 1 deletions
|
@ -75,6 +75,17 @@ void TextTrack::set_id(String id)
|
||||||
m_id = id;
|
m_id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/media.html#dom-texttrack-mode
|
||||||
|
Bindings::TextTrackMode TextTrack::mode()
|
||||||
|
{
|
||||||
|
return m_mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TextTrack::set_mode(Bindings::TextTrackMode mode)
|
||||||
|
{
|
||||||
|
m_mode = mode;
|
||||||
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/media.html#handler-texttrack-oncuechange
|
// https://html.spec.whatwg.org/multipage/media.html#handler-texttrack-oncuechange
|
||||||
void TextTrack::set_oncuechange(WebIDL::CallbackType* event_handler)
|
void TextTrack::set_oncuechange(WebIDL::CallbackType* event_handler)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,6 +36,9 @@ public:
|
||||||
String id();
|
String id();
|
||||||
void set_id(String);
|
void set_id(String);
|
||||||
|
|
||||||
|
Bindings::TextTrackMode mode();
|
||||||
|
void set_mode(Bindings::TextTrackMode);
|
||||||
|
|
||||||
void set_oncuechange(WebIDL::CallbackType*);
|
void set_oncuechange(WebIDL::CallbackType*);
|
||||||
WebIDL::CallbackType* oncuechange();
|
WebIDL::CallbackType* oncuechange();
|
||||||
|
|
||||||
|
@ -49,6 +52,8 @@ private:
|
||||||
String m_language {};
|
String m_language {};
|
||||||
|
|
||||||
String m_id {};
|
String m_id {};
|
||||||
|
|
||||||
|
Bindings::TextTrackMode m_mode { Bindings::TextTrackMode::Disabled };
|
||||||
};
|
};
|
||||||
|
|
||||||
Bindings::TextTrackKind text_track_kind_from_string(String);
|
Bindings::TextTrackKind text_track_kind_from_string(String);
|
||||||
|
|
|
@ -16,7 +16,7 @@ interface TextTrack : EventTarget {
|
||||||
readonly attribute DOMString id;
|
readonly attribute DOMString id;
|
||||||
[FIXME] readonly attribute DOMString inBandMetadataTrackDispatchType;
|
[FIXME] readonly attribute DOMString inBandMetadataTrackDispatchType;
|
||||||
|
|
||||||
[FIXME] attribute TextTrackMode mode;
|
attribute TextTrackMode mode;
|
||||||
|
|
||||||
[FIXME] readonly attribute TextTrackCueList? cues;
|
[FIXME] readonly attribute TextTrackCueList? cues;
|
||||||
[FIXME] readonly attribute TextTrackCueList? activeCues;
|
[FIXME] readonly attribute TextTrackCueList? activeCues;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue