HtmlErrorEvent
The event that is published in case of an HTML parse error.
using AngleSharp.Extensions;
using AngleSharp.Html;
using AngleSharp.Parser.Html;
namespace AngleSharp.Dom.Events
{
public class HtmlErrorEvent : Event
{
private readonly HtmlParseError _code;
private readonly TextPosition _position;
public TextPosition Position => _position;
public int Code => _code.GetCode();
public string Message => _code.GetMessage();
public HtmlErrorEvent(HtmlParseError code, TextPosition position)
: base(EventNames.ParseError, false, false)
{
_code = code;
_position = position;
}
}
}