UNPKG

@cedx/webstorage

Version:

Service for interacting with the Web Storage.

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