HashChangedEvent
Represents a custom event that provides an additional details property.
using AngleSharp.Attributes;
namespace AngleSharp.Dom.Events
{
[DomName("HashChangeEvent")]
public class HashChangedEvent : Event
{
[DomName("oldURL")]
public string PreviousUrl { get; set; }
[DomName("newURL")]
public string CurrentUrl { get; set; }
public HashChangedEvent()
{
}
[DomConstructor]
[DomInitDict(1, true)]
public HashChangedEvent(string type, bool bubbles = false, bool cancelable = false, string oldURL = null, string newURL = null)
{
Init(type, bubbles, cancelable, oldURL ?? string.Empty, newURL ?? string.Empty);
}
[DomName("initHashChangedEvent")]
public void Init(string type, bool bubbles, bool cancelable, string previousUrl, string currentUrl)
{
Init(type, bubbles, cancelable);
Stop();
PreviousUrl = previousUrl;
CurrentUrl = currentUrl;
}
}
}