W3C home > Mailing lists > Public > public-html-diffs@w3.org > April 2012

hixie: Transition this API to strings rather than numbers. (whatwg r7071)

From: poot <cvsmail@w3.org>
Date: Wed, 25 Apr 2012 16:58:57 -0400
To: public-html-diffs@w3.org
Message-Id: <E1SN9If-0005CS-Bb@jay.w3.org>
hixie: Transition this API to strings rather than numbers. (whatwg
r7071)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5636&r2=1.5637&f=h
http://html5.org/tools/web-apps-tracker?from=7070&to=7071

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5636
retrieving revision 1.5637
diff -u -d -r1.5636 -r1.5637
--- Overview.html	25 Apr 2012 20:39:44 -0000	1.5636
+++ Overview.html	25 Apr 2012 20:58:44 -0000	1.5637
@@ -31227,10 +31227,7 @@
   readonly attribute DOMString <a href="#dom-texttrack-label" title="dom-TextTrack-label">label</a>;
   readonly attribute DOMString <a href="#dom-texttrack-language" title="dom-TextTrack-language">language</a>;
 
-  const unsigned short <a href="#dom-texttrack-disabled" title="dom-TextTrack-DISABLED">DISABLED</a> = 0;
-  const unsigned short <a href="#dom-texttrack-hidden" title="dom-TextTrack-HIDDEN">HIDDEN</a> = 1;
-  const unsigned short <a href="#dom-texttrack-showing" title="dom-TextTrack-SHOWING">SHOWING</a> = 2;
-           attribute unsigned short <a href="#dom-texttrack-mode" title="dom-TextTrack-mode">mode</a>;
+           attribute DOMString <a href="#dom-texttrack-mode" title="dom-TextTrack-mode">mode</a>;
 
   readonly attribute <a href="#texttrackcuelist">TextTrackCueList</a>? <a href="#dom-texttrack-cues" title="dom-TextTrack-cues">cues</a>;
   readonly attribute <a href="#texttrackcuelist">TextTrackCueList</a>? <a href="#dom-texttrack-activecues" title="dom-TextTrack-activeCues">activeCues</a>;
@@ -31259,16 +31256,16 @@
    <dt><var title="">textTrack</var> . <code title="dom-TextTrack-mode"><a href="#dom-texttrack-mode">mode</a></code> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <a href="#text-track-mode">text track mode</a>, represented by a
-    number from the following list:</p>
-    <dl><dt><code><a href="#texttrack">TextTrack</a></code> . <code title="dom-TextTrack-DISABLED"><a href="#dom-texttrack-disabled">DISABLED</a></code> (0)</dt>
+    string from the following list:</p>
+    <dl><dt>"<code title="dom-TextTrack-disabled"><a href="#dom-texttrack-disabled">disabled</a></code>"</dt>
      <dd>
       <p>The <a href="#text-track-disabled">text track disabled</a> mode.</p>
      </dd>
-     <dt><code><a href="#texttrack">TextTrack</a></code> . <code title="dom-TextTrack-HIDDEN"><a href="#dom-texttrack-hidden">HIDDEN</a></code> (1)</dt>
+     <dt>"<code title="dom-TextTrack-hidden"><a href="#dom-texttrack-hidden">hidden</a></code>"</dt>
      <dd>
       <p>The <a href="#text-track-hidden">text track hidden</a> mode.</p>
      </dd>
-     <dt><code><a href="#texttrack">TextTrack</a></code> . <code title="dom-TextTrack-SHOWING"><a href="#dom-texttrack-showing">SHOWING</a></code> (2)</dt>
+     <dt>"<code title="dom-TextTrack-showing"><a href="#dom-texttrack-showing">showing</a></code>"</dt>
      <dd>
       <p>The <a href="#text-track-showing">text track showing</a> and <a href="#text-track-showing-by-default" title="text track showing by default">showing by default</a> modes.</p>
      </dd>
@@ -31320,24 +31317,23 @@
   represents.</p>
 
   <p>The <dfn id="dom-texttrack-mode" title="dom-TextTrack-mode"><code>mode</code></dfn>
-  attribute, on getting, must return the numeric value corresponding
-  to the <a href="#text-track-mode">text track mode</a> of the <a href="#text-track">text track</a>
-  that the <code><a href="#texttrack">TextTrack</a></code> object represents, as defined by
-  the following list:</p>
+  attribute, on getting, must return the string corresponding to the
+  <a href="#text-track-mode">text track mode</a> of the <a href="#text-track">text track</a> that the
+  <code><a href="#texttrack">TextTrack</a></code> object represents, as defined by the
+  following list:</p>
 
-  <dl><dt><dfn id="dom-texttrack-disabled" title="dom-TextTrack-DISABLED"><code>DISABLED</code></dfn> (numeric value 0)</dt>
+  <dl><dt>"<dfn id="dom-texttrack-disabled" title="dom-TextTrack-disabled"><code>disabled</code></dfn>"</dt>
    <dd>The <a href="#text-track-disabled">text track disabled</a> mode.</dd>
-   <dt><dfn id="dom-texttrack-hidden" title="dom-TextTrack-HIDDEN"><code>HIDDEN</code></dfn> (numeric value 1)</dt>
+   <dt>"<dfn id="dom-texttrack-hidden" title="dom-TextTrack-hidden"><code>hidden</code></dfn>"</dt>
    <dd>The <a href="#text-track-hidden">text track hidden</a> mode.</dd>
-   <dt><dfn id="dom-texttrack-showing" title="dom-TextTrack-SHOWING"><code>SHOWING</code></dfn> (numeric value 2)</dt>
+   <dt>"<dfn id="dom-texttrack-showing" title="dom-TextTrack-showing"><code>showing</code></dfn>"</dt>
    <dd>The <a href="#text-track-showing">text track showing</a> and <a href="#text-track-showing-by-default" title="text track showing by default">showing by default</a> modes.</dd>
-  </dl><p>On setting, if the new value is not either 0, 1, or 2, the user
-  agent must throw an <code><a href="#invalidaccesserror">InvalidAccessError</a></code>
-  exception. Otherwise, if the new value isn't equal to what the
-  attribute would currently return, the new value must be processed as
-  follows:</p>
+  </dl><p>On setting, if the new value is not either the string "<code title="dom-TextTrack-disabled"><a href="#dom-texttrack-disabled">disabled</a></code>", "<code title="dom-TextTrack-hidden"><a href="#dom-texttrack-hidden">hidden</a></code>", "<code title="dom-TextTrack-showing"><a href="#dom-texttrack-showing">showing</a></code>", the user agent must
+  throw an <code><a href="#invalidaccesserror">InvalidAccessError</a></code> exception. Otherwise, if
+  the new value isn't equal to what the attribute would currently
+  return, the new value must be processed as follows:</p>
 
-  <dl class="switch"><dt>If the new value is 0</dt>
+  <dl class="switch"><dt>If the new value is "<code title="dom-TextTrack-disabled"><a href="#dom-texttrack-disabled">disabled</a></code>"</dt>
 
    <dd>
 
@@ -31347,7 +31343,7 @@
 
    </dd>
 
-   <dt>If the new value is 1</dt>
+   <dt>If the new value is "<code title="dom-TextTrack-hidden"><a href="#dom-texttrack-hidden">hidden</a></code>"</dt>
 
    <dd>
 
@@ -31357,7 +31353,7 @@
 
    </dd>
 
-   <dt>If the new value is 2</dt>
+   <dt>If the new value is "<code title="dom-TextTrack-showing"><a href="#dom-texttrack-showing">showing</a></code>"</dt>
 
    <dd>
 
@@ -31365,15 +31361,15 @@
     track</a> that the <code><a href="#texttrack">TextTrack</a></code> object represents to
     the <a href="#text-track-showing">text track showing</a> mode.</p>
 
-    <p class="note">If the mode had been <a href="#text-track-showing-by-default" title="text track
-    showing by default">showing by default</a>, this will change it
-    to <a href="#text-track-showing" title="text track showing">showing</a>, even though
-    the value of <code title="dom-TextTrack-mode"><a href="#dom-texttrack-mode">mode</a></code> would
-    appear not to change.</p>
-
    </dd>
 
-  </dl><p>If the <a href="#text-track-mode">text track mode</a> of the <a href="#text-track">text
+  </dl><p class="note">If the mode is <a href="#text-track-showing-by-default" title="text track showing by
+  default">showing by default</a>, then there is no way to change
+  it to <a href="#text-track-showing" title="text track showing">showing</a> without first
+  changing it to <a href="#text-track-disabled" title="text track disabled">disabled</a> or
+  <a href="#text-track-hidden" title="text track hidden">hidden</a>.</p>
+
+  <p>If the <a href="#text-track-mode">text track mode</a> of the <a href="#text-track">text
   track</a> that the <code><a href="#texttrack">TextTrack</a></code> object represents is
   not the <a href="#text-track-disabled">text track disabled</a> mode, then the <dfn id="dom-texttrack-cues" title="dom-TextTrack-cues"><code>cues</code></dfn> attribute must
   return a <a href="#live">live</a> <code><a href="#texttrackcuelist">TextTrackCueList</a></code> object that
Received on Wednesday, 25 April 2012 20:59:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 20:59:01 GMT