The StorageEvent() constructor creates a new StorageEvent object.
new StorageEvent(type)
new StorageEvent(type, options)typeA string with the name of the type of the StorageEvent. It is case-sensitive and browsers set it to storage.
options OptionalAn object that, in addition of the properties defined in Event(), has the following properties:
key OptionalA string that represents the key for the storage item that changed. Defaults to null.
oldValue OptionalA string containing the original value of the storage item. Defaults to null.
newValue OptionalA string with the new value of the key. Defaults to null.
urlA string with the URL of the document whose storage changed.
storageArea OptionalA Storage object that represents the storage that was affected. Defaults to null.
A new StorageEvent object.