AngleSharp by AngleSharp

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

.NET API 1,204,224 bytes

 HtmlDialogElement

Represents the object for HTML dialog elements.
using AngleSharp.Dom.Css; using AngleSharp.Dom.Events; using AngleSharp.Extensions; using AngleSharp.Html; namespace AngleSharp.Dom.Html { internal sealed class HtmlDialogElement : HtmlElement, IHtmlDialogElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle, IGlobalEventHandlers { private string _returnValue; public bool Open { get { return this.HasOwnAttribute(AttributeNames.Open); } set { this.SetOwnAttribute(AttributeNames.Open, value ? string.Empty : null, false); } } public string ReturnValue { get { return _returnValue; } set { _returnValue = value; } } public HtmlDialogElement(Document owner, string prefix = null) : base(owner, TagNames.Dialog, prefix, 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; } } }