Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Internet Explorer
Events
 onstorage event
onstorage event

Fires when a Web Storage area is updated.

HTML5 A vocabulary and associated APIs for HTML and XHTMLInternet Explorer 8

Syntax

HTML Attribute <element onstorage = "handler(event)">
Event Property object.onstorage = handler;
attachEvent Method object.attachEvent("onstorage", handler)
addEventListener Method object.addEventListener("storage", handler, useCapture)

Standards information

Event information

SynchronousNo
BubblesNo
CancelableNo

Event handler parameters

pEvtObj [in]

Type: IHTMLEventObj

Remarks

The url property of the event specifies the URL of the Web page that made the update.

For Windows Internet Explorer 9 standards mode, onstorage will only fire on window objects. Handlers attached to document.body or document objects will not receive the event. (Note this does not apply to the onstoragecommit event.)

The onstorage event will only fire on window objects. Handlers attached to document.body or document objects will not receive the event. (Note this does not apply to the onstoragecommit event.)

The onstorage event is specified in the W3C Web Storage specification.

To invoke this event, do one of the following:

  • Set or update a session or local storage value with setItem.
  • Remove a session or local storage value with removeItem.

See also

document
frameSet
window
Introduction to DOM Storage

 

 

Send comments about this topic to Microsoft

Build date: 3/14/2012

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker