mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +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: https://github.com/LadybirdBrowser/ladybird/commit/4b16f1df052 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;
|
||||
}
|
||||
|
||||
// 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
|
||||
void TextTrack::set_oncuechange(WebIDL::CallbackType* event_handler)
|
||||
{
|
||||
|
|
|
@ -36,6 +36,9 @@ public:
|
|||
String id();
|
||||
void set_id(String);
|
||||
|
||||
Bindings::TextTrackMode mode();
|
||||
void set_mode(Bindings::TextTrackMode);
|
||||
|
||||
void set_oncuechange(WebIDL::CallbackType*);
|
||||
WebIDL::CallbackType* oncuechange();
|
||||
|
||||
|
@ -49,6 +52,8 @@ private:
|
|||
String m_language {};
|
||||
|
||||
String m_id {};
|
||||
|
||||
Bindings::TextTrackMode m_mode { Bindings::TextTrackMode::Disabled };
|
||||
};
|
||||
|
||||
Bindings::TextTrackKind text_track_kind_from_string(String);
|
||||
|
|
|
@ -16,7 +16,7 @@ interface TextTrack : EventTarget {
|
|||
readonly attribute DOMString id;
|
||||
[FIXME] readonly attribute DOMString inBandMetadataTrackDispatchType;
|
||||
|
||||
[FIXME] attribute TextTrackMode mode;
|
||||
attribute TextTrackMode mode;
|
||||
|
||||
[FIXME] readonly attribute TextTrackCueList? cues;
|
||||
[FIXME] readonly attribute TextTrackCueList? activeCues;
|
||||
|
|
Loading…
Reference in a new issue