AngleSharp by AngleSharp

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

.NET API 1,214,976 bytes

 HtmlTableCellElement

Represents the object for HTML table cell elements.
using AngleSharp.Dom.Collections; using AngleSharp.Dom.Css; using AngleSharp.Dom.Events; using AngleSharp.Extensions; using AngleSharp.Html; namespace AngleSharp.Dom.Html { internal abstract class HtmlTableCellElement : HtmlElement, IHtmlTableCellElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle, IGlobalEventHandlers { private SettableTokenList _headers; public int Index { get { IElement parentElement = base.ParentElement; while (parentElement != null && !(parentElement is IHtmlTableRowElement)) { parentElement = parentElement.ParentElement; } HtmlTableRowElement obj = parentElement as HtmlTableRowElement; if (obj == null) return -1; return obj.IndexOf(this); } } public HorizontalAlignment Align { get { return this.GetOwnAttribute(AttributeNames.Align).ToEnum(HorizontalAlignment.Left); } set { this.SetOwnAttribute(AttributeNames.Align, value.ToString(), false); } } public VerticalAlignment VAlign { get { return this.GetOwnAttribute(AttributeNames.Valign).ToEnum(VerticalAlignment.Middle); } set { this.SetOwnAttribute(AttributeNames.Valign, value.ToString(), false); } } public string BgColor { get { return this.GetOwnAttribute(AttributeNames.BgColor); } set { this.SetOwnAttribute(AttributeNames.BgColor, value, false); } } public string Width { get { return this.GetOwnAttribute(AttributeNames.Width); } set { this.SetOwnAttribute(AttributeNames.Width, value, false); } } public string Height { get { return this.GetOwnAttribute(AttributeNames.Height); } set { this.SetOwnAttribute(AttributeNames.Height, value, false); } } public int ColumnSpan { get { return this.GetOwnAttribute(AttributeNames.ColSpan).ToInteger(0); } set { this.SetOwnAttribute(AttributeNames.ColSpan, value.ToString(), false); } } public int RowSpan { get { return this.GetOwnAttribute(AttributeNames.RowSpan).ToInteger(0); } set { this.SetOwnAttribute(AttributeNames.RowSpan, value.ToString(), false); } } public bool NoWrap { get { return this.GetOwnAttribute(AttributeNames.NoWrap).ToBoolean(false); } set { this.SetOwnAttribute(AttributeNames.NoWrap, value.ToString(), false); } } public string Abbr { get { return this.GetOwnAttribute(AttributeNames.Abbr); } set { this.SetOwnAttribute(AttributeNames.Abbr, value, false); } } public string Scope { get { return this.GetOwnAttribute(AttributeNames.Scope); } set { this.SetOwnAttribute(AttributeNames.Scope, value, false); } } public ISettableTokenList Headers { get { if (_headers == null) { _headers = new SettableTokenList(this.GetOwnAttribute(AttributeNames.Headers)); _headers.Changed += delegate(string value) { UpdateAttribute(AttributeNames.Headers, value); }; } return _headers; } } public string Axis { get { return this.GetOwnAttribute(AttributeNames.Axis); } set { this.SetOwnAttribute(AttributeNames.Axis, value, false); } } static HtmlTableCellElement() { Element.RegisterCallback(AttributeNames.Headers, delegate(HtmlTableCellElement element, string value) { element._headers?.Update(value); }); } public HtmlTableCellElement(Document owner, string name, string prefix) : base(owner, name, prefix, NodeFlags.Special | NodeFlags.ImplicitelyClosed | NodeFlags.Scoped) { } } }