[EME] Clarify the promise behavior in the comments for example function removeStoredSession()
authorDavid Dorwin <ddorwin@google.com>
Fri, 09 May 2014 12:07:35 -0700
changeset 308 3e43535939f2
parent 307 d426f69d04bc
child 309 055b9f0b9ecd
[EME] Clarify the promise behavior in the comments for example function removeStoredSession()
encrypted-media/encrypted-media.html
encrypted-media/encrypted-media.xml
--- a/encrypted-media/encrypted-media.html	Wed May 07 16:13:46 2014 -0700
+++ b/encrypted-media/encrypted-media.html	Fri May 09 12:07:35 2014 -0700
@@ -98,7 +98,7 @@
     <div class="head">
       <p><a href="http://www.w3.org/"><img src="https://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48"></a></p>
       <h1>Encrypted Media Extensions</h1>
-      <h2 id="draft-date">W3C Editor's Draft 7 May 2014</h2>
+      <h2 id="draft-date">W3C Editor's Draft 9 May 2014</h2>
       <dl>
         <dt>This Version:</dt>
         <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html</a></dd>
@@ -1770,14 +1770,14 @@
   }
 
   // Called when the application wants to stop using the session without removing the stored license.
-  closeSession(keySession) {
+  function closeSession(keySession) {
     keySession.<a href="#dom-close">close</a>();
   }
 
   // Called when the application wants to remove the stored license.
-  // Calling remove() may initiate a series of messages to/from the server.
-  // The stored session data has not been completely removed until the returned promise is fulfilled.
-  removeStoredSession(keySession) {
+  // The stored session data has not been completely removed until the promise returned by remove() is fulfilled.
+  // The remove() call may initiate a series of messages to/from the server that must be completed before this occurs.
+  function removeStoredSession(keySession) {
     keySession.<a href="#dom-remove">remove</a>().then(
       function() {
         console.log("Session " + this.sessionId + " removed");
--- a/encrypted-media/encrypted-media.xml	Wed May 07 16:13:46 2014 -0700
+++ b/encrypted-media/encrypted-media.xml	Fri May 09 12:07:35 2014 -0700
@@ -97,7 +97,7 @@
     <div class="head">
       <p><a href="http://www.w3.org/"><img src="https://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48" /></a></p>
       <h1>Encrypted Media Extensions</h1>
-      <h2 id="draft-date">W3C Editor's Draft 7 May 2014</h2>
+      <h2 id="draft-date">W3C Editor's Draft 9 May 2014</h2>
       <dl>
         <dt>This Version:</dt>
         <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html</a></dd>
@@ -1693,14 +1693,14 @@
   }
 
   // Called when the application wants to stop using the session without removing the stored license.
-  closeSession(keySession) {
+  function closeSession(keySession) {
     keySession.<premethodref>close</premethodref>();
   }
 
   // Called when the application wants to remove the stored license.
-  // Calling remove() may initiate a series of messages to/from the server.
-  // The stored session data has not been completely removed until the returned promise is fulfilled.
-  removeStoredSession(keySession) {
+  // The stored session data has not been completely removed until the promise returned by remove() is fulfilled.
+  // The remove() call may initiate a series of messages to/from the server that must be completed before this occurs.
+  function removeStoredSession(keySession) {
     keySession.<premethodref>remove</premethodref>().then(
       function() {
         console.log("Session " + this.sessionId + " removed");