HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2568[Gecko] [Internet Explorer] [Webkit] Add a 'storageArea' attribute on the storage event object. (credit: be)2008-12-24 11:56
@@ -44111,20 +44111,23 @@ user reload must be equivalent to .reload()
   object whose <code>Window</code> object's <code
   title="dom-localStorage">localStorage</code> attribute's
   <code>Storage</code> object is associated with the same storage
   area, other than <var title="">x</var>, a <code
   title="event-storage">storage</code> event must be fired, as <span
   title="event-storage">described below</span>.</p>
 
 
   <h5>The <code title="event-storage">storage</code> event</h5>
 
+  <!-- XXX fix up for workers: target is wrong, source and storageArea
+  definitions are wrong -->
+
   <p>The <dfn title="event-storage"><code>storage</code></dfn> event
   is fired in an <code>HTMLDocument</code> when a storage area
   changes, as described in the previous two sections (<a
   href="#sessionStorageEvent">for session storage</a>, <a
   href="#localStorageEvent">for local storage</a>).</p>
 
   <p>When this happens, the user agent must dispatch an event with the
   name <code>storage</code>, with no namespace, which does not bubble
   but is cancelable, and which uses the <code>StorageEvent</code>, at
   <span>the body element</span> of each <span title="active
@@ -44144,38 +44147,43 @@ user reload must be equivalent to .reload()
 
   <p>Otherwise, if the event is being fired due to an invocation of
   the <code title="dom-Storage-clear">clear()</code> method, the event
   must have its <code title="dom-StorageEvent-key">key</code>, <code
   title="dom-StorageEvent-oldValue">oldValue</code>, and <code
   title="dom-StorageEvent-newValue">newValue</code> attributes set to
   null.</p>
 
   <p>In addition, the event must have its <code
   title="dom-StorageEvent-url">url</code> attribute set to the address
-  of the page whose <code>Storage</code> object was affected, and its
+  of the page whose <code>Storage</code> object was affected; its
   <code title="dom-StorageEvent-source">source</code> attribute set to
   the <code>Window</code> object of the <span>browsing context</span>
   that that document is in, if the two documents are in the same
-  <span>unit of related browsing contexts</span>, or null
-  otherwise.</p>
+  <span>unit of related browsing contexts</span>, or null otherwise;
+  and its <code title="dom-StorageEvent-storageArea">storageArea</code>
+  attribute set to the <code>Storage</code> object from the
+  <code>Window</code> object of the target <code>Document</code> that
+  represents the same kind of <code>Storage</code> area as was
+  affected (i.e. session or local).</p>
 
 
   <h6>Event definition</h6>
 
   <pre class="idl">interface <dfn>StorageEvent</dfn> : Event {
   readonly attribute DOMString <span title="dom-StorageEvent-key">key</span>;
   readonly attribute DOMString <span title="dom-StorageEvent-oldValue">oldValue</span>;
   readonly attribute DOMString <span title="dom-StorageEvent-newValue">newValue</span>;
   readonly attribute DOMString <span title="dom-StorageEvent-url">url</span>;
   readonly attribute <span>Window</span> <span title="dom-StorageEvent-source">source</span>;
-  void <span title="dom-StorageEvent-initStorageEvent">initStorageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in Window sourceArg);
-  void <span title="dom-StorageEvent-initStorageEventNS">initStorageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in Window sourceArg);
+  readonly attribute <span>Storage</span> <span title="dom-StorageEvent-storage">storageArea</span>;
+  void <span title="dom-StorageEvent-initStorageEvent">initStorageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <span>Window</span> sourceArg, in <span>Storage</span> storageAreaArg);
+  void <span title="dom-StorageEvent-initStorageEventNS">initStorageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <span>Window</span> sourceArg, in <span>Storage</span> storageAreaArg);
 };</pre>
 
   <p>The <dfn
   title="dom-StorageEvent-initStorageEvent"><code>initStorageEvent()</code></dfn>
   and <dfn
   title="dom-StorageEvent-initStorageEventNS"><code>initStorageEventNS()</code></dfn>
   methods must initialize the event in a manner analogous to the
   similarly-named methods in the DOM3 Events interfaces. <a
   href="#refsDOM3EVENTS">[DOM3EVENTS]</a></p>
 
@@ -44191,20 +44199,24 @@ user reload must be equivalent to .reload()
   attribute represents the new value of the key being changed.</p>
 
   <p>The <dfn title="dom-StorageEvent-url"><code>url</code></dfn>
   attribute represents the address of the document that changed the
   key.</p>
 
   <p>The <dfn
   title="dom-StorageEvent-source"><code>source</code></dfn> attribute
   represents the <code>Window</code> that changed the key.</p>
 
+  <p>The <dfn
+  title="dom-StorageEvent-storage"><code>storage</code></dfn> attribute
+  represents the <code>Storage</code> object that was affected.</p>
+
 
 
   <h5>Threads</h5>
 
   <p>Multiple browsing contexts must be able to access the local
   storage areas simultaneously in a predictable manner. Scripts must
   not be able to detect any concurrent script execution.</p>
 
   <p>This is required to guarantee that the <code
   title="dom-Storage-length">length</code> attribute of a

|