[html5] r7615 - [giow] (2) Try to clarify when 'storage' even fires. Fixing https://www.w3.org/B [...]

whatwg at whatwg.org whatwg at whatwg.org
Sun Dec 30 11:45:29 PST 2012


Author: ianh
Date: 2012-12-30 11:45:28 -0800 (Sun, 30 Dec 2012)
New Revision: 7615

Modified:
   complete.html
   index
   source
Log:
[giow] (2) Try to clarify when 'storage' even fires.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=19540
Affected topics: DOM APIs

Modified: complete.html
===================================================================
--- complete.html	2012-12-30 19:35:14 UTC (rev 7614)
+++ complete.html	2012-12-30 19:45:28 UTC (rev 7615)
@@ -85901,8 +85901,9 @@
   list, with the given <var title="">key</var> and with its value set
   to <var title="">value</var>.</p>
 
-  <p>If the given <var title="">key</var> <em>does</em> exist in the
-  list, then it must have its value updated to <var title="">value</var>.</p>
+  <p>If the given <var title="">key</var> <em>does</em> exist in the list, and its value is not
+  equal to <var title="">value</var>, then it must have its value updated to <var title="">value</var>. If its previous value <em>is</em> equal to <var title="">value</var>, then
+  the method must do nothing.</p>
 
   <p>If it couldn't set the new value, the method must throw an
   <code><a href=#quotaexceedederror>QuotaExceededError</a></code> exception. (Setting could fail if,
@@ -85926,7 +85927,7 @@
   none, then the method must do nothing.</p>
 
   <p class=note>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are invoked, events are fired on the
-  <code><a href=#window>Window</a></code> objecys of other <code><a href=#document>Document</a></code>s that can access the newly stored or
+  <code><a href=#window>Window</a></code> objects of other <code><a href=#document>Document</a></code>s that can access the newly stored or
   removed data, as defined in the sections on the <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</a></code> and <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attributes.</p> <!-- not normative, see the sections
   below for the normative statement -->
 
@@ -86005,10 +86006,10 @@
   on, however, the two session storage areas must be considered
   separate, not affecting each other in any way.</p>
 
-  <p id=sessionStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a <code><a href=#storage-0>Storage</a></code> object <var title="">x</var> that is associated with a session storage area, if the methods did something,
-  then for every <code><a href=#document>Document</a></code> object whose <code><a href=#window>Window</a></code> object's <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</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 href=#send-a-storage-notification>send a storage
-  notification</a>.
+  <p id=sessionStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a <code><a href=#storage-0>Storage</a></code> object <var title="">x</var> that is associated with a session storage area, if the methods did not throw an
+  exception or "do nothing" as defined above, then for every <code><a href=#document>Document</a></code> object whose
+  <code><a href=#window>Window</a></code> object's <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</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 href=#send-a-storage-notification>send a storage notification</a>.</p>
 
 
   <h4 id=the-localstorage-attribute><span class=secno>11.2.3 </span>The <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute</h4>
@@ -86058,14 +86059,10 @@
    origin's local storage area. Each <code><a href=#document>Document</a></code> object must
    have a separate object for its <code><a href=#window>Window</a></code>'s <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute.</p>
 
-  </ol><p id=localStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a
-  <code><a href=#storage-0>Storage</a></code> object <var title="">x</var> that is associated
-  with a local storage area, if the methods did something, then for
-  every <code><a href=#document>Document</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 href=#send-a-storage-notification>send a storage
-  notification</a>.
+  </ol><p id=localStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a <code><a href=#storage-0>Storage</a></code> object <var title="">x</var> that is associated with a local storage area, if the methods did not throw an
+  exception or "do nothing" as defined above, then for every <code><a href=#document>Document</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 href=#send-a-storage-notification>send a storage notification</a>.
 
   <p id=localStorageMutex>Whenever the properties of a <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute's
   <code><a href=#storage-0>Storage</a></code> object are to be examined, returned, set, or

Modified: index
===================================================================
--- index	2012-12-30 19:35:14 UTC (rev 7614)
+++ index	2012-12-30 19:45:28 UTC (rev 7615)
@@ -85901,8 +85901,9 @@
   list, with the given <var title="">key</var> and with its value set
   to <var title="">value</var>.</p>
 
-  <p>If the given <var title="">key</var> <em>does</em> exist in the
-  list, then it must have its value updated to <var title="">value</var>.</p>
+  <p>If the given <var title="">key</var> <em>does</em> exist in the list, and its value is not
+  equal to <var title="">value</var>, then it must have its value updated to <var title="">value</var>. If its previous value <em>is</em> equal to <var title="">value</var>, then
+  the method must do nothing.</p>
 
   <p>If it couldn't set the new value, the method must throw an
   <code><a href=#quotaexceedederror>QuotaExceededError</a></code> exception. (Setting could fail if,
@@ -85926,7 +85927,7 @@
   none, then the method must do nothing.</p>
 
   <p class=note>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are invoked, events are fired on the
-  <code><a href=#window>Window</a></code> objecys of other <code><a href=#document>Document</a></code>s that can access the newly stored or
+  <code><a href=#window>Window</a></code> objects of other <code><a href=#document>Document</a></code>s that can access the newly stored or
   removed data, as defined in the sections on the <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</a></code> and <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attributes.</p> <!-- not normative, see the sections
   below for the normative statement -->
 
@@ -86005,10 +86006,10 @@
   on, however, the two session storage areas must be considered
   separate, not affecting each other in any way.</p>
 
-  <p id=sessionStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a <code><a href=#storage-0>Storage</a></code> object <var title="">x</var> that is associated with a session storage area, if the methods did something,
-  then for every <code><a href=#document>Document</a></code> object whose <code><a href=#window>Window</a></code> object's <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</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 href=#send-a-storage-notification>send a storage
-  notification</a>.
+  <p id=sessionStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a <code><a href=#storage-0>Storage</a></code> object <var title="">x</var> that is associated with a session storage area, if the methods did not throw an
+  exception or "do nothing" as defined above, then for every <code><a href=#document>Document</a></code> object whose
+  <code><a href=#window>Window</a></code> object's <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</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 href=#send-a-storage-notification>send a storage notification</a>.</p>
 
 
   <h4 id=the-localstorage-attribute><span class=secno>11.2.3 </span>The <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute</h4>
@@ -86058,14 +86059,10 @@
    origin's local storage area. Each <code><a href=#document>Document</a></code> object must
    have a separate object for its <code><a href=#window>Window</a></code>'s <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute.</p>
 
-  </ol><p id=localStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a
-  <code><a href=#storage-0>Storage</a></code> object <var title="">x</var> that is associated
-  with a local storage area, if the methods did something, then for
-  every <code><a href=#document>Document</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 href=#send-a-storage-notification>send a storage
-  notification</a>.
+  </ol><p id=localStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a <code><a href=#storage-0>Storage</a></code> object <var title="">x</var> that is associated with a local storage area, if the methods did not throw an
+  exception or "do nothing" as defined above, then for every <code><a href=#document>Document</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 href=#send-a-storage-notification>send a storage notification</a>.
 
   <p id=localStorageMutex>Whenever the properties of a <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute's
   <code><a href=#storage-0>Storage</a></code> object are to be examined, returned, set, or

Modified: source
===================================================================
--- source	2012-12-30 19:35:14 UTC (rev 7614)
+++ source	2012-12-30 19:45:28 UTC (rev 7615)
@@ -99735,8 +99735,10 @@
   list, with the given <var title="">key</var> and with its value set
   to <var title="">value</var>.</p>
 
-  <p>If the given <var title="">key</var> <em>does</em> exist in the
-  list, then it must have its value updated to <var title="">value</var>.</p>
+  <p>If the given <var title="">key</var> <em>does</em> exist in the list, and its value is not
+  equal to <var title="">value</var>, then it must have its value updated to <var
+  title="">value</var>. If its previous value <em>is</em> equal to <var title="">value</var>, then
+  the method must do nothing.</p>
 
   <p>If it couldn't set the new value, the method must throw an
   <code>QuotaExceededError</code> exception. (Setting could fail if,
@@ -99764,7 +99766,7 @@
   <p class="note">When the <code title="dom-Storage-setItem">setItem()</code>, <code
   title="dom-Storage-removeItem">removeItem()</code>, and <code
   title="dom-Storage-clear">clear()</code> methods are invoked, events are fired on the
-  <code>Window</code> objecys of other <code>Document</code>s that can access the newly stored or
+  <code>Window</code> objects of other <code>Document</code>s that can access the newly stored or
   removed data, as defined in the sections on the <code
   title="dom-sessionStorage">sessionStorage</code> and <code
   title="dom-localStorage">localStorage</code> attributes.</p> <!-- not normative, see the sections
@@ -99850,11 +99852,11 @@
   <p id="sessionStorageEvent">When the <code title="dom-Storage-setItem">setItem()</code>, <code
   title="dom-Storage-removeItem">removeItem()</code>, and <code
   title="dom-Storage-clear">clear()</code> methods are called on a <code>Storage</code> object <var
-  title="">x</var> that is associated with a session storage area, if the methods did something,
-  then for every <code>Document</code> object whose <code>Window</code> object's <code
-  title="dom-sessionStorage">sessionStorage</code> attribute's <code>Storage</code> object is
-  associated with the same storage area, other than <var title="">x</var>, <span>send a storage
-  notification</span>.
+  title="">x</var> that is associated with a session storage area, if the methods did not throw an
+  exception or "do nothing" as defined above, then for every <code>Document</code> object whose
+  <code>Window</code> object's <code title="dom-sessionStorage">sessionStorage</code> attribute's
+  <code>Storage</code> object is associated with the same storage area, other than <var
+  title="">x</var>, <span>send a storage notification</span>.</p>
 
 
   <h5>The <code title="dom-localStorage">localStorage</code> attribute</h5>
@@ -99909,17 +99911,14 @@
 
   </ol>
 
-  <p id="localStorageEvent">When the <code
-  title="dom-Storage-setItem">setItem()</code>, <code
+  <p id="localStorageEvent">When the <code title="dom-Storage-setItem">setItem()</code>, <code
   title="dom-Storage-removeItem">removeItem()</code>, and <code
-  title="dom-Storage-clear">clear()</code> methods are called on a
-  <code>Storage</code> object <var title="">x</var> that is associated
-  with a local storage area, if the methods did something, then for
-  every <code>Document</code> 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>, <span>send a storage
-  notification</span>.
+  title="dom-Storage-clear">clear()</code> methods are called on a <code>Storage</code> object <var
+  title="">x</var> that is associated with a local storage area, if the methods did not throw an
+  exception or "do nothing" as defined above, then for every <code>Document</code> 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>, <span>send a storage notification</span>.
 
   <p id="localStorageMutex">Whenever the properties of a <code
   title="dom-localStorage">localStorage</code> attribute's




More information about the Commit-Watchers mailing list