Table of Contents

Class HashChangedEvent

Namespace
AngleSharp.Dom.Events
Assembly
AngleSharp.dll

Represents a custom event that provides an additional details property.

[DomName("HashChangeEvent")]
public class HashChangedEvent : Event
Inheritance
HashChangedEvent
Inherited Members
Extension Methods

Constructors

HashChangedEvent()

Creates a new event.

public HashChangedEvent()

HashChangedEvent(string, bool, bool, string?, string?)

Creates a new event and initializes it.

[DomConstructor]
[DomInitDict(1, true)]
public HashChangedEvent(string type, bool bubbles = false, bool cancelable = false, string? oldURL = null, string? newURL = null)

Parameters

type string

The type of the event.

bubbles bool

If the event is bubbling.

cancelable bool

If the event is cancelable.

oldURL string

The previous URL.

newURL string

The current URL.

Properties

CurrentUrl

Gets the URL after the hash changed.

[DomName("newURL")]
public string CurrentUrl { get; }

Property Value

string

PreviousUrl

Gets the URL before the hash changed.

[DomName("oldURL")]
public string PreviousUrl { get; }

Property Value

string

Methods

Init(string, bool, bool, string, string)

Initializes the hashchanged event.

[DomName("initHashChangedEvent")]
public void Init(string type, bool bubbles, bool cancelable, string previousUrl, string currentUrl)

Parameters

type string

The type of event.

bubbles bool

Determines if the event bubbles.

cancelable bool

Determines if the event is cancelable.

previousUrl string

The previous URL.

currentUrl string

The current URL.