HtmlKeygenElement
sealed class HtmlKeygenElement : HtmlFormControlElementWithState, IHtmlKeygenElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle, IValidation
Represents the keygen element.
using AngleSharp.Dom.Css;
using AngleSharp.Html;
namespace AngleSharp.Dom.Html
{
internal sealed class HtmlKeygenElement : HtmlFormControlElementWithState, IHtmlKeygenElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle, IValidation
{
public string Challenge {
get {
return GetOwnAttribute(AttributeNames.Challenge);
}
set {
SetOwnAttribute(AttributeNames.Challenge, value);
}
}
public string KeyEncryption {
get {
return GetOwnAttribute(AttributeNames.Keytype);
}
set {
SetOwnAttribute(AttributeNames.Keytype, value);
}
}
public string Type => Tags.Keygen;
public HtmlKeygenElement(Document owner, string prefix = null)
: base(owner, Tags.Keygen, prefix, NodeFlags.SelfClosing)
{
}
internal override FormControlState SaveControlState()
{
return new FormControlState(base.Name, Type, Challenge);
}
internal override void RestoreFormControlState(FormControlState state)
{
if (state.Type == Type && state.Name == base.Name)
Challenge = state.Value;
}
protected override bool CanBeValidated()
{
return false;
}
}
}