HtmlMapElement
sealed class HtmlMapElement : HtmlElement, IHtmlMapElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IGlobalEventHandlers
Represents the HTML map element.
using AngleSharp.Dom;
using AngleSharp.Dom.Events;
using AngleSharp.Text;
using System.Runtime.CompilerServices;
namespace AngleSharp.Html.Dom
{
internal sealed class HtmlMapElement : HtmlElement, IHtmlMapElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IGlobalEventHandlers
{
[System.Runtime.CompilerServices.Nullable(new byte[] {
2,
1
})]
private HtmlCollection<IHtmlAreaElement> _areas;
[System.Runtime.CompilerServices.Nullable(new byte[] {
2,
1
})]
private HtmlCollection<IHtmlImageElement> _images;
[System.Runtime.CompilerServices.Nullable(2)]
public string Name {
[System.Runtime.CompilerServices.NullableContext(2)]
get {
return this.GetOwnAttribute(AttributeNames.Name);
}
[System.Runtime.CompilerServices.NullableContext(2)]
set {
this.SetOwnAttribute(AttributeNames.Name, value, false);
}
}
[System.Runtime.CompilerServices.Nullable(1)]
public IHtmlCollection<IHtmlAreaElement> Areas {
[System.Runtime.CompilerServices.NullableContext(1)]
get {
return _areas ?? (_areas = new HtmlCollection<IHtmlAreaElement>(this, false, null));
}
}
[System.Runtime.CompilerServices.Nullable(1)]
public IHtmlCollection<IHtmlImageElement> Images {
[System.Runtime.CompilerServices.NullableContext(1)]
get {
return _images ?? (_images = new HtmlCollection<IHtmlImageElement>(base.Owner.DocumentElement, true, IsAssociatedImage));
}
}
[System.Runtime.CompilerServices.NullableContext(1)]
public HtmlMapElement(Document owner, [System.Runtime.CompilerServices.Nullable(2)] string prefix = null)
: base(owner, TagNames.Map, prefix, NodeFlags.None)
{
}
[System.Runtime.CompilerServices.NullableContext(1)]
private bool IsAssociatedImage(IHtmlImageElement image)
{
string useMap = image.UseMap;
if (!string.IsNullOrEmpty(useMap)) {
string other = useMap.Has('#', 0) ? ("#" + Name) : Name;
return useMap.Is(other);
}
return false;
}
}
}