HTMLOutputElement
Represents an HTML output element.
namespace AngleSharp.DOM.Html
{
public sealed class HTMLOutputElement : HTMLFormControlElement
{
internal const string Tag = "output";
private bool isDefaultValue;
private string defValue;
[DOM("defaultValue")]
public string DefaultValue {
get {
return defValue;
}
}
[DOM("value")]
public string Value {
get {
return TextContent;
}
set {
if (isDefaultValue) {
defValue = Value;
isDefaultValue = false;
}
TextContent = value;
}
}
[DOM("htmlFor")]
public string HtmlFor {
get {
return GetAttribute("for");
}
set {
SetAttribute("for", value);
}
}
[DOM("type")]
public string Type {
get {
return "output";
}
}
internal HTMLOutputElement()
{
_name = "output";
defValue = string.Empty;
isDefaultValue = true;
}
internal override void Reset()
{
if (!isDefaultValue) {
TextContent = defValue;
isDefaultValue = true;
}
}
}
}