AngleSharp by Florian Rappl

<PackageReference Include="AngleSharp" Version="0.8.0" />

.NET API 1,171,968 bytes

 HtmlProgressElement

Represents the HTML progress element.
using AngleSharp.Dom.Collections; using AngleSharp.Dom.Css; using AngleSharp.Extensions; using AngleSharp.Html; using System; using System.Globalization; namespace AngleSharp.Dom.Html { internal sealed class HtmlProgressElement : HtmlElement, ILabelabelElement, IHtmlProgressElement, IHtmlElement, IElement, INode, IEventTarget, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle { private readonly NodeList labels; public bool SupportsLabels => true; public INodeList Labels => labels; public bool IsDeterminate => !string.IsNullOrEmpty(GetAttribute(AttributeNames.Value)); public double Value { get { return GetAttribute(AttributeNames.Value).ToDouble(0); } set { SetAttribute(AttributeNames.Value, value.ToString(NumberFormatInfo.InvariantInfo)); } } public double Max { get { return GetAttribute(AttributeNames.Max).ToDouble(1); } set { SetAttribute(AttributeNames.Max, value.ToString(NumberFormatInfo.InvariantInfo)); } } public double Position { get { if (!IsDeterminate) return -1; return Math.Max(Math.Min(Value / Max, 1), 0); } } public HtmlProgressElement(Document owner) : base(owner, Tags.Progress, NodeFlags.None) { labels = new NodeList(); } } }