HTMLObjectElement
sealed class HTMLObjectElement : HTMLFormControlElement, IHtmlObjectElement, IHtmlElement, IElement, INode, IEventTarget, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle, IValidation
Represents the HTML object element.
using AngleSharp.DOM.Css;
namespace AngleSharp.DOM.Html
{
internal sealed class HTMLObjectElement : HTMLFormControlElement, IHtmlObjectElement, IHtmlElement, IElement, INode, IEventTarget, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle, IValidation
{
private IDocument _contentDocument;
private IWindowProxy _contentWindow;
private int _objWidth;
private int _objHeight;
public string Source {
get {
return GetAttribute(AttributeNames.Data);
}
set {
SetAttribute(AttributeNames.Data, value);
}
}
public string Type {
get {
return GetAttribute(AttributeNames.Type);
}
set {
SetAttribute(AttributeNames.Type, value);
}
}
public bool TypeMustMatch {
get {
return GetAttribute(AttributeNames.TypeMustMatch) != null;
}
set {
SetAttribute(AttributeNames.TypeMustMatch, value ? string.Empty : null);
}
}
public string UseMap {
get {
return GetAttribute(AttributeNames.UseMap);
}
set {
SetAttribute(AttributeNames.UseMap, value);
}
}
public int DisplayWidth {
get {
return GetAttribute(AttributeNames.Width).ToInteger(_objWidth);
}
set {
SetAttribute(AttributeNames.Width, value.ToString());
}
}
public int DisplayHeight {
get {
return GetAttribute(AttributeNames.Height).ToInteger(_objHeight);
}
set {
SetAttribute(AttributeNames.Height, value.ToString());
}
}
public IDocument ContentDocument => _contentDocument;
public IWindowProxy ContentWindow => _contentWindow;
internal HTMLObjectElement()
: base(Tags.Object, NodeFlags.Scoped)
{
_contentDocument = null;
_contentWindow = null;
_objHeight = 0;
_objWidth = 0;
}
}
}