CustomEvent
Represents a custom event that provides an additional details property.
using AngleSharp.Attributes;
using AngleSharp.Extensions;
using System.Collections.Generic;
namespace AngleSharp.Dom.Events
{
[DomName("CustomEvent")]
public class CustomEvent : Event
{
[DomName("detail")]
public object Details { get; set; }
public CustomEvent()
{
}
public CustomEvent(string type, bool bubbles, bool cancelable, object details)
{
Init(type, bubbles, cancelable, details);
}
[DomConstructor]
public CustomEvent(string type, IDictionary<string, object> eventInitDict = null)
: base(type, eventInitDict)
{
Details = eventInitDict.TryGet("detail");
}
[DomName("initCustomEvent")]
public void Init(string type, bool bubbles, bool cancelable, object details)
{
Init(type, bubbles, cancelable);
Details = details;
}
}
}