UNPKG

@cedx/webstorage

Version:

Service for interacting with the Web Storage.

34 lines (33 loc) 699 B
/** * An event dispatched when the storage has been changed. */ export class StorageEvent extends Event { /** * The event type. */ static type = "storage:change"; /** * The changed key. */ key; /** * The new value. */ newValue; /** * The original value. */ oldValue; /** * Creates a new cookie event. * @param key The changed key. * @param oldValue The original value. * @param newValue The new value. */ constructor(key, oldValue = null, newValue = null) { super(StorageEvent.type); this.key = key; this.newValue = newValue; this.oldValue = oldValue; } }