AngleSharp by Florian Rappl

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

.NET API 1,172,480 bytes

 HtmlDialogElement

Represents the object for HTML dialog elements.
using AngleSharp.Dom.Css; using AngleSharp.Html; namespace AngleSharp.Dom.Html { internal sealed class HtmlDialogElement : HtmlElement, IHtmlDialogElement, IHtmlElement, IElement, INode, IEventTarget, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle { private string _returnValue; public bool Open { get { return GetAttribute(AttributeNames.Open) != null; } set { SetAttribute(AttributeNames.Open, value ? string.Empty : null); } } public string ReturnValue { get { return _returnValue; } set { _returnValue = value; } } public HtmlDialogElement(Document owner) : base(owner, Tags.Dialog, NodeFlags.None) { } public void Show(IElement anchor = null) { Open = true; } public void ShowModal(IElement anchor = null) { Open = true; } public void Close(string returnValue = null) { Open = false; ReturnValue = returnValue; } } }