HtmlTrackElement
sealed class HtmlTrackElement : HtmlElement, IHtmlTrackElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle
Represents the HTML track element.
using AngleSharp.Dom.Css;
using AngleSharp.Dom.Media;
using AngleSharp.Extensions;
using AngleSharp.Html;
namespace AngleSharp.Dom.Html
{
internal sealed class HtmlTrackElement : HtmlElement, IHtmlTrackElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle
{
private TrackReadyState _ready;
public string Kind {
get {
return this.GetOwnAttribute(AttributeNames.Kind);
}
set {
this.SetOwnAttribute(AttributeNames.Kind, value);
}
}
public string Source {
get {
return this.GetUrlAttribute(AttributeNames.Src);
}
set {
this.SetOwnAttribute(AttributeNames.Src, value);
}
}
public string SourceLanguage {
get {
return this.GetOwnAttribute(AttributeNames.SrcLang);
}
set {
this.SetOwnAttribute(AttributeNames.SrcLang, value);
}
}
public string Label {
get {
return this.GetOwnAttribute(AttributeNames.Label);
}
set {
this.SetOwnAttribute(AttributeNames.Label, value);
}
}
public bool IsDefault {
get {
return this.HasOwnAttribute(AttributeNames.Default);
}
set {
this.SetOwnAttribute(AttributeNames.Default, value ? string.Empty : null);
}
}
public TrackReadyState ReadyState => _ready;
public ITextTrack Track => null;
public HtmlTrackElement(Document owner, string prefix = null)
: base(owner, Tags.Track, prefix, NodeFlags.SelfClosing | NodeFlags.Special)
{
_ready = TrackReadyState.None;
}
}
}