class js.html.StorageEvent extends Event

Available on js

Describes an event occurring on HTML5 client-side storage data.
1.0
11.0
Introduced
Gecko 2.0
Inherits from: nsIDOMEvent Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

A StorageEvent is sent to a window when a storage area changes.

Gecko 2.0 note
(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Although this event existed prior to Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) , it did not match the specification. The old event format is now represented by the nsIDOMStorageEventObsolete interface.



Documentation for this class was provided by MDN.

Instance Fields

var key:String

Represents the key changed. The key attribute is null when the change is caused by the storage clear() method. Read only.

var newValue:String

The new value of the key. The newValue is null when the change has been invoked by storage clear() method or the key has been removed from the storage. Read only.

var oldValue:String

The original value of the key. The oldValue is null when the change has been invoked by storage clear() method or the key has been newly added and therefor doesn't have any previous value. Read only.

var storageArea:Storage

Represents the Storage object that was affected. Read only.

var url:String

The URL of the document whose key changed. Read only.

function new(type:String, ?canBubble:Bool, ?cancelable:Bool):Void

function initStorageEvent(typeArg:String, canBubbleArg:Bool, cancelableArg:Bool, keyArg:String, ?oldValueArg:String, ?newValueArg:String, urlArg:String, storageAreaArg:Storage):Void