- From: poot <cvsmail@w3.org>
- Date: Wed, 24 Dec 2008 20:58:56 +0900 (JST)
- To: public-html-diffs@w3.org
Add a 'storageArea' attribute on the storage event object. (credit: be) (whatwg r2568) initStorageEventNS() http://people.w3.org/mike/diffs/html5/spec/Overview.1.1739.html#dom-storageevent-initstorageeventns When the setItem(), removeItem(), and clear() methods are called on a Storage object x that is associated with a local storage area, then in every HTMLDocument object whose Window object's localStorage attribute's Storage object is associated with the same storage area, other than x, a storage event must be fired, as described below. http://people.w3.org/mike/diffs/html5/spec/Overview.1.1739.html#localStorageEvent storage http://people.w3.org/mike/diffs/html5/spec/Overview.1.1739.html#dom-storageevent-storage initStorageEvent() http://people.w3.org/mike/diffs/html5/spec/Overview.1.1739.html#dom-storageevent-initstorageevent url http://people.w3.org/mike/diffs/html5/spec/Overview.1.1739.html#dom-storageevent-url 5.10.1.5.1 Event definition http://people.w3.org/mike/diffs/html5/spec/Overview.1.1739.html#event-definition-0 storage http://people.w3.org/mike/diffs/html5/spec/Overview.1.1739.html#event-storage 5.10.1.6 Threads http://people.w3.org/mike/diffs/html5/spec/Overview.1.1739.html#threads source http://people.w3.org/mike/diffs/html5/spec/Overview.1.1739.html#dom-storageevent-source 5.10.1.5 The storage event http://people.w3.org/mike/diffs/html5/spec/Overview.1.1739.html#the-storage-event http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1738&r2=1.1739&f=h http://html5.org/tools/web-apps-tracker?from=2567&to=2568 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1738 retrieving revision 1.1739 diff -u -d -r1.1738 -r1.1739 --- Overview.html 24 Dec 2008 11:10:24 -0000 1.1738 +++ Overview.html 24 Dec 2008 11:56:05 -0000 1.1739 @@ -31490,7 +31490,8 @@ with a local storage area, then in every <code><a href=#htmldocument>HTMLDocument</a></code> object whose <code><a href=#window>Window</a></code> object's <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute's <code><a href=#storage-0>Storage</a></code> object is associated with the same storage - area, other than <var title="">x</var>, a <code title=event-storage><a href=#event-storage>storage</a></code> event must be fired, as <a href=#event-storage title=event-storage>described below</a>.<h5 id=the-storage-event><span class=secno>5.10.1.5 </span>The <code title=event-storage><a href=#event-storage>storage</a></code> event</h5><p>The <dfn id=event-storage title=event-storage><code>storage</code></dfn> event + area, other than <var title="">x</var>, a <code title=event-storage><a href=#event-storage>storage</a></code> event must be fired, as <a href=#event-storage title=event-storage>described below</a>.<h5 id=the-storage-event><span class=secno>5.10.1.5 </span>The <code title=event-storage><a href=#event-storage>storage</a></code> event</h5><!-- XXX fix up for workers: target is wrong, source and storageArea + definitions are wrong --><p>The <dfn id=event-storage title=event-storage><code>storage</code></dfn> event is fired in an <code><a href=#htmldocument>HTMLDocument</a></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>When this happens, the user agent must dispatch an event with the name <code><a href=#storage-0>storage</a></code>, with no namespace, which does not bubble @@ -31508,19 +31509,24 @@ the <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> method, the event must have its <code title=dom-StorageEvent-key><a href=#dom-storageevent-key>key</a></code>, <code title=dom-StorageEvent-oldValue><a href=#dom-storageevent-oldvalue>oldValue</a></code>, and <code title=dom-StorageEvent-newValue>newValue</code> attributes set to null.<p>In addition, the event must have its <code title=dom-StorageEvent-url><a href=#dom-storageevent-url>url</a></code> attribute set to the address - of the page whose <code><a href=#storage-0>Storage</a></code> object was affected, and its + of the page whose <code><a href=#storage-0>Storage</a></code> object was affected; its <code title=dom-StorageEvent-source><a href=#dom-storageevent-source>source</a></code> attribute set to the <code><a href=#window>Window</a></code> object of the <a href=#browsing-context>browsing context</a> that that document is in, if the two documents are in the same - <a href=#unit-of-related-browsing-contexts>unit of related browsing contexts</a>, or null - otherwise.<h6 id=event-definition-0><span class=secno>5.10.1.5.1 </span>Event definition</h6><pre class=idl>interface <dfn id=storageevent>StorageEvent</dfn> : Event { + <a href=#unit-of-related-browsing-contexts>unit of related browsing contexts</a>, or null otherwise; + and its <code title=dom-StorageEvent-storageArea>storageArea</code> + attribute set to the <code><a href=#storage-0>Storage</a></code> object from the + <code><a href=#window>Window</a></code> object of the target <code>Document</code> that + represents the same kind of <code><a href=#storage-0>Storage</a></code> area as was + affected (i.e. session or local).<h6 id=event-definition-0><span class=secno>5.10.1.5.1 </span>Event definition</h6><pre class=idl>interface <dfn id=storageevent>StorageEvent</dfn> : Event { readonly attribute DOMString <a href=#dom-storageevent-key title=dom-StorageEvent-key>key</a>; readonly attribute DOMString <a href=#dom-storageevent-oldvalue title=dom-StorageEvent-oldValue>oldValue</a>; readonly attribute DOMString <span title=dom-StorageEvent-newValue>newValue</span>; readonly attribute DOMString <a href=#dom-storageevent-url title=dom-StorageEvent-url>url</a>; readonly attribute <a href=#window>Window</a> <a href=#dom-storageevent-source title=dom-StorageEvent-source>source</a>; - void <a href=#dom-storageevent-initstorageevent title=dom-StorageEvent-initStorageEvent>initStorageEvent</a>(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 <a href=#dom-storageevent-initstorageeventns title=dom-StorageEvent-initStorageEventNS>initStorageEventNS</a>(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 <a href=#storage-0>Storage</a> <a href=#dom-storageevent-storage title=dom-StorageEvent-storage>storageArea</a>; + void <a href=#dom-storageevent-initstorageevent title=dom-StorageEvent-initStorageEvent>initStorageEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <a href=#window>Window</a> sourceArg, in <a href=#storage-0>Storage</a> storageAreaArg); + void <a href=#dom-storageevent-initstorageeventns title=dom-StorageEvent-initStorageEventNS>initStorageEventNS</a>(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 <a href=#window>Window</a> sourceArg, in <a href=#storage-0>Storage</a> storageAreaArg); };</pre><p>The <dfn id=dom-storageevent-initstorageevent title=dom-StorageEvent-initStorageEvent><code>initStorageEvent()</code></dfn> and <dfn id=dom-storageevent-initstorageeventns title=dom-StorageEvent-initStorageEventNS><code>initStorageEventNS()</code></dfn> methods must initialize the event in a manner analogous to the @@ -31530,7 +31536,8 @@ attribute represents the new value of the key being changed.<p>The <dfn id=dom-storageevent-url title=dom-StorageEvent-url><code>url</code></dfn> attribute represents the address of the document that changed the key.<p>The <dfn id=dom-storageevent-source title=dom-StorageEvent-source><code>source</code></dfn> attribute - represents the <code><a href=#window>Window</a></code> that changed the key.<h5 id=threads><span class=secno>5.10.1.6 </span>Threads</h5><p>Multiple browsing contexts must be able to access the local + represents the <code><a href=#window>Window</a></code> that changed the key.<p>The <dfn id=dom-storageevent-storage title=dom-StorageEvent-storage><code>storage</code></dfn> attribute + represents the <code><a href=#storage-0>Storage</a></code> object that was affected.<h5 id=threads><span class=secno>5.10.1.6 </span>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>This is required to guarantee that the <code title=dom-Storage-length><a href=#dom-storage-length>length</a></code> attribute of a <code><a href=#storage-0>Storage</a></code> object never changes while a script is
Received on Wednesday, 24 December 2008 11:59:32 UTC