LibWeb: Implement the HTMLTrackElement.kind attribute

This reflects the HTML `kind` attribute.
This commit is contained in:
Tim Ledbetter 2024-06-29 23:07:57 +01:00 committed by Andreas Kling
commit bdaa7f0e8e
Notes: sideshowbarker 2024-07-17 20:19:08 +09:00
4 changed files with 39 additions and 1 deletions

View file

@ -94,6 +94,7 @@ namespace AttributeNames {
__ENUMERATE_HTML_ATTRIBUTE(is) \
__ENUMERATE_HTML_ATTRIBUTE(ismap) \
__ENUMERATE_HTML_ATTRIBUTE(itemscope) \
__ENUMERATE_HTML_ATTRIBUTE(kind) \
__ENUMERATE_HTML_ATTRIBUTE(label) \
__ENUMERATE_HTML_ATTRIBUTE(lang) \
__ENUMERATE_HTML_ATTRIBUTE(language) \

View file

@ -1,12 +1,22 @@
#import <HTML/HTMLElement.idl>
// https://html.spec.whatwg.org/multipage/media.html#attr-track-kind
[MissingValueDefault=subtitles, InvalidValueDefault=metadata]
enum TrackKindAttribute {
"subtitles",
"captions",
"descriptions",
"chapters",
"metadata"
};
// https://html.spec.whatwg.org/multipage/media.html#htmltrackelement
[Exposed=Window]
interface HTMLTrackElement : HTMLElement {
[HTMLConstructor] constructor();
[FIXME, CEReactions] attribute DOMString kind;
[CEReactions, Enumerated=TrackKindAttribute, Reflect] attribute DOMString kind;
[CEReactions, Reflect] attribute DOMString src;
[CEReactions, Reflect] attribute DOMString srclang;
[CEReactions, Reflect] attribute DOMString label;