[html5] r7606 - [giow] (2) Document navigator.language. (Also, add a Workers topic you can subsc [...]

whatwg at whatwg.org whatwg at whatwg.org
Sat Dec 29 16:04:22 PST 2012


Author: ianh
Date: 2012-12-29 16:04:21 -0800 (Sat, 29 Dec 2012)
New Revision: 7606

Modified:
   complete.html
   index
   source
Log:
[giow] (2) Document navigator.language. (Also, add a Workers topic you can subscribe to. Right now, it's a subset of the DOM APIs topic.)
Affected topics: DOM APIs, HTML, Workers

Modified: complete.html
===================================================================
--- complete.html	2012-12-29 17:49:29 UTC (rev 7605)
+++ complete.html	2012-12-30 00:04:21 UTC (rev 7606)
@@ -979,11 +979,12 @@
      <li><a href=#the-navigator-object><span class=secno>7.5.1 </span>The <code>Navigator</code> object</a>
       <ol>
        <li><a href=#client-identification><span class=secno>7.5.1.1 </span>Client identification</a></li>
-       <li><a href=#custom-handlers><span class=secno>7.5.1.2 </span>Custom scheme and content handlers</a>
+       <li><a href=#language-preferences><span class=secno>7.5.1.2 </span>Language preferences</a></li>
+       <li><a href=#custom-handlers><span class=secno>7.5.1.3 </span>Custom scheme and content handlers</a>
         <ol>
-         <li><a href=#security-and-privacy><span class=secno>7.5.1.2.1 </span>Security and privacy</a></li>
-         <li><a href=#sample-handler-impl><span class=secno>7.5.1.2.2 </span>Sample user interface</a></ol></li>
-       <li><a href=#manually-releasing-the-storage-mutex><span class=secno>7.5.1.3 </span>Manually releasing the storage mutex</a></ol></li>
+         <li><a href=#security-and-privacy><span class=secno>7.5.1.3.1 </span>Security and privacy</a></li>
+         <li><a href=#sample-handler-impl><span class=secno>7.5.1.3.2 </span>Sample user interface</a></ol></li>
+       <li><a href=#manually-releasing-the-storage-mutex><span class=secno>7.5.1.4 </span>Manually releasing the storage mutex</a></ol></li>
      <li><a href=#the-external-interface><span class=secno>7.5.2 </span>The <code>External</code> interface</a></ol></li>
    <li><a href=#images><span class=secno>7.6 </span>Images</a></ol></li>
  <li><a href=#editing><span class=secno>8 </span>User interaction</a>
@@ -75459,6 +75460,7 @@
   // objects implementing this interface also implement the interfaces given below
 };
 <a href=#navigator>Navigator</a> implements <a href=#navigatorid>NavigatorID</a>;
+<a href=#navigator>Navigator</a> implements <a href=#navigatorlanguage>NavigatorLanguage</a>;
 <a href=#navigator>Navigator</a> implements <a href=#navigatoronline>NavigatorOnLine</a>;
 <a href=#navigator>Navigator</a> implements <a href=#navigatorcontentutils>NavigatorContentUtils</a>;
 <a href=#navigator>Navigator</a> implements <a href=#navigatorstorageutils>NavigatorStorageUtils</a>;</pre>
@@ -75476,14 +75478,6 @@
   specifications can re-use parts of the <code><a href=#navigator>Navigator</a></code>
   interface.</p>
 
-   <!-- v2: also, could expose languages:
-   <dt><dfn title="dom-navigator-browserLanguage"><code>browserLanguage</code></dfn></dt> <!- - Opera and IE only - ->
-   <dd><p>Must return either null or a language tag representing the language the browser uses in its interface.</p></dd>
-   <dt><dfn title="dom-navigator-userLanguage"><code>userLanguage</code></dfn></dt> <!- - Opera and IE only - ->
-   <dt><dfn title="dom-navigator-language"><code>language</code></dfn></dt> <!- - Opera, Safari, and Mozilla only - ->
-   <dd><p>Must return either null or a language tag representing the user's preferred language.</p></dd>
-   -->
-
   </div>
 
 
@@ -75563,7 +75557,7 @@
 
    <!-- vendorSub: Mozilla and Safari only; always returns "" -->
 
-  </dl><p class=warning>Any information in this API that varies from user
+  </dl><!-- similar paragraph in next section --><p class=warning>Any information in this API that varies from user
   to user can be used to profile the user. In fact, if enough such
   information is available, a user can actually be uniquely
   identified. For this reason, user agent implementors are strongly
@@ -75573,10 +75567,44 @@
 
   </div>
 
+  <!-- next section refers to previous section as "previous section" -->
 
-  <h5 id=custom-handlers><span class=secno>7.5.1.2 </span>Custom scheme and content handlers</h5>
+  <h5 id=language-preferences><span class=secno>7.5.1.2 </span>Language preferences</h5>
 
   <pre class=idl>[NoInterfaceObject]
+interface <dfn id=navigatorlanguage>NavigatorLanguage</dfn> {
+  readonly attribute DOMString? <a href=#dom-navigator-language title=dom-navigator-language>language</a>;
+};</pre>
+
+  <dl class=domintro><dt><var title="">window</var> . <code title=dom-navigator><a href=#dom-navigator>navigator</a></code> . <code title=dom-navigator-language><a href=#dom-navigator-language>language</a></code></dt>
+   <dd>
+    <p>Returns a language tag representing the user's preferred language.</p>
+   </dd>
+
+  </dl><div class=impl>
+
+  <dl><!--
+   <dt><dfn title="dom-navigator-browserLanguage"><code>browserLanguage</code></dfn></dt> <!- - Opera and IE only - ->
+   <dd><p>Must return either null or a language tag representing the language the browser uses in its interface.</p></dd>
+
+
+   <dt><dfn title="dom-navigator-userLanguage"><code>userLanguage</code></dfn></dt> <!- - Opera and IE only - ->
+   --><!-- at time of testing, this was supported by Opera, Safari, and Mozilla only --><dt><dfn id=dom-navigator-language title=dom-navigator-language><code>language</code></dfn></dt>
+   <dd><p>Must return either null or a language tag representing the user's preferred language.</dd>
+
+  </dl><p class=warning>As for the API in the previous section, any information in this API that varies
+  from user to user can be used to profile or identify the user. For this reason, user agent
+  implementors are encouraged to return null unless the user has explicitly indicated that the site
+  in question is allowed access to the information.
+  <a class=fingerprint href=#fingerprint><img alt="(This is a fingerprinting vector.)" src=http://images.whatwg.org/fingerprint.png></a>
+  </p>
+
+  </div>
+
+
+  <h5 id=custom-handlers><span class=secno>7.5.1.3 </span>Custom scheme and content handlers</h5>
+
+  <pre class=idl>[NoInterfaceObject]
 interface <dfn id=navigatorcontentutils>NavigatorContentUtils</dfn> {
   // content handler registration
   void <a href=#dom-navigator-registerprotocolhandler title=dom-navigator-registerProtocolHandler>registerProtocolHandler</a>(DOMString scheme, DOMString url, DOMString title);
@@ -76049,7 +76077,7 @@
 <!--ADD-TOPIC:Security-->
   <div class=impl>
 
-  <h6 id=security-and-privacy><span class=secno>7.5.1.2.1 </span>Security and privacy</h6>
+  <h6 id=security-and-privacy><span class=secno>7.5.1.3.1 </span>Security and privacy</h6>
 
   <p>These mechanisms can introduce a number of concerns, in
   particular privacy concerns.</p>
@@ -76145,7 +76173,7 @@
 
   <div class=impl>
 
-  <h6 id=sample-handler-impl><span class=secno>7.5.1.2.2 </span>Sample user interface</h6>
+  <h6 id=sample-handler-impl><span class=secno>7.5.1.3.2 </span>Sample user interface</h6>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -76191,7 +76219,7 @@
 
 
 
-  <h5 id=manually-releasing-the-storage-mutex><span class=secno>7.5.1.3 </span>Manually releasing the storage mutex</h5>
+  <h5 id=manually-releasing-the-storage-mutex><span class=secno>7.5.1.4 </span>Manually releasing the storage mutex</h5>
 
   <pre class=idl>[NoInterfaceObject]
 interface <dfn id=navigatorstorageutils>NavigatorStorageUtils</dfn> {
@@ -80444,6 +80472,8 @@
 
 
 
+<!--ADD-TOPIC:Workers-->
+
   <h2 id=workers><span class=secno>9 </span>Web workers</h2>
 
 
@@ -82667,13 +82697,9 @@
 
   <pre class=idl>interface <dfn id=workernavigator>WorkerNavigator</dfn> {};
 <a href=#workernavigator>WorkerNavigator</a> implements <a href=#navigatorid>NavigatorID</a>;
+<a href=#workernavigator>WorkerNavigator</a> implements <a href=#navigatorlanguage>NavigatorLanguage</a>;
 <a href=#workernavigator>WorkerNavigator</a> implements <a href=#navigatoronline>NavigatorOnLine</a>;</pre>
 
-  <p>Objects implementing the <code><a href=#workernavigator>WorkerNavigator</a></code> interface
-  also implement the <code><a href=#navigatorid>NavigatorID</a></code> and
-  <code><a href=#navigatoronline>NavigatorOnLine</a></code> interfaces.
-  </p>
-
   <p>The <code><a href=#workernavigator>WorkerNavigator</a></code> interface must only be <a href=#expose title=expose>exposed</a> if the <a href=#javascript-global-environment>JavaScript global
   environment</a> is a <a href=#worker-environment>worker environment</a>.</p>
 
@@ -82748,10 +82774,10 @@
 
 
 
+<!--REMOVE-TOPIC:Workers-->
 
 
 
-
   <h2 id=comms><span class=secno>10 </span>Communication</h2>
 
 
@@ -104109,6 +104135,7 @@
    <li><code><a href=#navigator>Navigator</a></code>
    <li><code><a href=#navigatorcontentutils>NavigatorContentUtils</a></code>
    <li><code><a href=#navigatorid>NavigatorID</a></code>
+   <li><code><a href=#navigatorlanguage>NavigatorLanguage</a></code>
    <li><code><a href=#navigatoronline>NavigatorOnLine</a></code>
    <li><code><a href=#navigatorstorageutils>NavigatorStorageUtils</a></code>
    <li><code><a href=#pagetransitionevent>PageTransitionEvent</a></code>

Modified: index
===================================================================
--- index	2012-12-29 17:49:29 UTC (rev 7605)
+++ index	2012-12-30 00:04:21 UTC (rev 7606)
@@ -979,11 +979,12 @@
      <li><a href=#the-navigator-object><span class=secno>7.5.1 </span>The <code>Navigator</code> object</a>
       <ol>
        <li><a href=#client-identification><span class=secno>7.5.1.1 </span>Client identification</a></li>
-       <li><a href=#custom-handlers><span class=secno>7.5.1.2 </span>Custom scheme and content handlers</a>
+       <li><a href=#language-preferences><span class=secno>7.5.1.2 </span>Language preferences</a></li>
+       <li><a href=#custom-handlers><span class=secno>7.5.1.3 </span>Custom scheme and content handlers</a>
         <ol>
-         <li><a href=#security-and-privacy><span class=secno>7.5.1.2.1 </span>Security and privacy</a></li>
-         <li><a href=#sample-handler-impl><span class=secno>7.5.1.2.2 </span>Sample user interface</a></ol></li>
-       <li><a href=#manually-releasing-the-storage-mutex><span class=secno>7.5.1.3 </span>Manually releasing the storage mutex</a></ol></li>
+         <li><a href=#security-and-privacy><span class=secno>7.5.1.3.1 </span>Security and privacy</a></li>
+         <li><a href=#sample-handler-impl><span class=secno>7.5.1.3.2 </span>Sample user interface</a></ol></li>
+       <li><a href=#manually-releasing-the-storage-mutex><span class=secno>7.5.1.4 </span>Manually releasing the storage mutex</a></ol></li>
      <li><a href=#the-external-interface><span class=secno>7.5.2 </span>The <code>External</code> interface</a></ol></li>
    <li><a href=#images><span class=secno>7.6 </span>Images</a></ol></li>
  <li><a href=#editing><span class=secno>8 </span>User interaction</a>
@@ -75459,6 +75460,7 @@
   // objects implementing this interface also implement the interfaces given below
 };
 <a href=#navigator>Navigator</a> implements <a href=#navigatorid>NavigatorID</a>;
+<a href=#navigator>Navigator</a> implements <a href=#navigatorlanguage>NavigatorLanguage</a>;
 <a href=#navigator>Navigator</a> implements <a href=#navigatoronline>NavigatorOnLine</a>;
 <a href=#navigator>Navigator</a> implements <a href=#navigatorcontentutils>NavigatorContentUtils</a>;
 <a href=#navigator>Navigator</a> implements <a href=#navigatorstorageutils>NavigatorStorageUtils</a>;</pre>
@@ -75476,14 +75478,6 @@
   specifications can re-use parts of the <code><a href=#navigator>Navigator</a></code>
   interface.</p>
 
-   <!-- v2: also, could expose languages:
-   <dt><dfn title="dom-navigator-browserLanguage"><code>browserLanguage</code></dfn></dt> <!- - Opera and IE only - ->
-   <dd><p>Must return either null or a language tag representing the language the browser uses in its interface.</p></dd>
-   <dt><dfn title="dom-navigator-userLanguage"><code>userLanguage</code></dfn></dt> <!- - Opera and IE only - ->
-   <dt><dfn title="dom-navigator-language"><code>language</code></dfn></dt> <!- - Opera, Safari, and Mozilla only - ->
-   <dd><p>Must return either null or a language tag representing the user's preferred language.</p></dd>
-   -->
-
   </div>
 
 
@@ -75563,7 +75557,7 @@
 
    <!-- vendorSub: Mozilla and Safari only; always returns "" -->
 
-  </dl><p class=warning>Any information in this API that varies from user
+  </dl><!-- similar paragraph in next section --><p class=warning>Any information in this API that varies from user
   to user can be used to profile the user. In fact, if enough such
   information is available, a user can actually be uniquely
   identified. For this reason, user agent implementors are strongly
@@ -75573,10 +75567,44 @@
 
   </div>
 
+  <!-- next section refers to previous section as "previous section" -->
 
-  <h5 id=custom-handlers><span class=secno>7.5.1.2 </span>Custom scheme and content handlers</h5>
+  <h5 id=language-preferences><span class=secno>7.5.1.2 </span>Language preferences</h5>
 
   <pre class=idl>[NoInterfaceObject]
+interface <dfn id=navigatorlanguage>NavigatorLanguage</dfn> {
+  readonly attribute DOMString? <a href=#dom-navigator-language title=dom-navigator-language>language</a>;
+};</pre>
+
+  <dl class=domintro><dt><var title="">window</var> . <code title=dom-navigator><a href=#dom-navigator>navigator</a></code> . <code title=dom-navigator-language><a href=#dom-navigator-language>language</a></code></dt>
+   <dd>
+    <p>Returns a language tag representing the user's preferred language.</p>
+   </dd>
+
+  </dl><div class=impl>
+
+  <dl><!--
+   <dt><dfn title="dom-navigator-browserLanguage"><code>browserLanguage</code></dfn></dt> <!- - Opera and IE only - ->
+   <dd><p>Must return either null or a language tag representing the language the browser uses in its interface.</p></dd>
+
+
+   <dt><dfn title="dom-navigator-userLanguage"><code>userLanguage</code></dfn></dt> <!- - Opera and IE only - ->
+   --><!-- at time of testing, this was supported by Opera, Safari, and Mozilla only --><dt><dfn id=dom-navigator-language title=dom-navigator-language><code>language</code></dfn></dt>
+   <dd><p>Must return either null or a language tag representing the user's preferred language.</dd>
+
+  </dl><p class=warning>As for the API in the previous section, any information in this API that varies
+  from user to user can be used to profile or identify the user. For this reason, user agent
+  implementors are encouraged to return null unless the user has explicitly indicated that the site
+  in question is allowed access to the information.
+  <a class=fingerprint href=#fingerprint><img alt="(This is a fingerprinting vector.)" src=http://images.whatwg.org/fingerprint.png></a>
+  </p>
+
+  </div>
+
+
+  <h5 id=custom-handlers><span class=secno>7.5.1.3 </span>Custom scheme and content handlers</h5>
+
+  <pre class=idl>[NoInterfaceObject]
 interface <dfn id=navigatorcontentutils>NavigatorContentUtils</dfn> {
   // content handler registration
   void <a href=#dom-navigator-registerprotocolhandler title=dom-navigator-registerProtocolHandler>registerProtocolHandler</a>(DOMString scheme, DOMString url, DOMString title);
@@ -76049,7 +76077,7 @@
 <!--ADD-TOPIC:Security-->
   <div class=impl>
 
-  <h6 id=security-and-privacy><span class=secno>7.5.1.2.1 </span>Security and privacy</h6>
+  <h6 id=security-and-privacy><span class=secno>7.5.1.3.1 </span>Security and privacy</h6>
 
   <p>These mechanisms can introduce a number of concerns, in
   particular privacy concerns.</p>
@@ -76145,7 +76173,7 @@
 
   <div class=impl>
 
-  <h6 id=sample-handler-impl><span class=secno>7.5.1.2.2 </span>Sample user interface</h6>
+  <h6 id=sample-handler-impl><span class=secno>7.5.1.3.2 </span>Sample user interface</h6>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -76191,7 +76219,7 @@
 
 
 
-  <h5 id=manually-releasing-the-storage-mutex><span class=secno>7.5.1.3 </span>Manually releasing the storage mutex</h5>
+  <h5 id=manually-releasing-the-storage-mutex><span class=secno>7.5.1.4 </span>Manually releasing the storage mutex</h5>
 
   <pre class=idl>[NoInterfaceObject]
 interface <dfn id=navigatorstorageutils>NavigatorStorageUtils</dfn> {
@@ -80444,6 +80472,8 @@
 
 
 
+<!--ADD-TOPIC:Workers-->
+
   <h2 id=workers><span class=secno>9 </span>Web workers</h2>
 
 
@@ -82667,13 +82697,9 @@
 
   <pre class=idl>interface <dfn id=workernavigator>WorkerNavigator</dfn> {};
 <a href=#workernavigator>WorkerNavigator</a> implements <a href=#navigatorid>NavigatorID</a>;
+<a href=#workernavigator>WorkerNavigator</a> implements <a href=#navigatorlanguage>NavigatorLanguage</a>;
 <a href=#workernavigator>WorkerNavigator</a> implements <a href=#navigatoronline>NavigatorOnLine</a>;</pre>
 
-  <p>Objects implementing the <code><a href=#workernavigator>WorkerNavigator</a></code> interface
-  also implement the <code><a href=#navigatorid>NavigatorID</a></code> and
-  <code><a href=#navigatoronline>NavigatorOnLine</a></code> interfaces.
-  </p>
-
   <p>The <code><a href=#workernavigator>WorkerNavigator</a></code> interface must only be <a href=#expose title=expose>exposed</a> if the <a href=#javascript-global-environment>JavaScript global
   environment</a> is a <a href=#worker-environment>worker environment</a>.</p>
 
@@ -82748,10 +82774,10 @@
 
 
 
+<!--REMOVE-TOPIC:Workers-->
 
 
 
-
   <h2 id=comms><span class=secno>10 </span>Communication</h2>
 
 
@@ -104109,6 +104135,7 @@
    <li><code><a href=#navigator>Navigator</a></code>
    <li><code><a href=#navigatorcontentutils>NavigatorContentUtils</a></code>
    <li><code><a href=#navigatorid>NavigatorID</a></code>
+   <li><code><a href=#navigatorlanguage>NavigatorLanguage</a></code>
    <li><code><a href=#navigatoronline>NavigatorOnLine</a></code>
    <li><code><a href=#navigatorstorageutils>NavigatorStorageUtils</a></code>
    <li><code><a href=#pagetransitionevent>PageTransitionEvent</a></code>

Modified: source
===================================================================
--- source	2012-12-29 17:49:29 UTC (rev 7605)
+++ source	2012-12-30 00:04:21 UTC (rev 7606)
@@ -88229,6 +88229,7 @@
   // objects implementing this interface also implement the interfaces given below
 };
 <span>Navigator</span> implements <span>NavigatorID</span>;
+<span>Navigator</span> implements <span>NavigatorLanguage</span>;
 <span>Navigator</span> implements <span>NavigatorOnLine</span>;
 <span>Navigator</span> implements <span>NavigatorContentUtils</span>;
 <span>Navigator</span> implements <span>NavigatorStorageUtils</span>;</pre>
@@ -88246,14 +88247,6 @@
   specifications can re-use parts of the <code>Navigator</code>
   interface.</p>
 
-   <!-- v2: also, could expose languages:
-   <dt><dfn title="dom-navigator-browserLanguage"><code>browserLanguage</code></dfn></dt> <!- - Opera and IE only - ->
-   <dd><p>Must return either null or a language tag representing the language the browser uses in its interface.</p></dd>
-   <dt><dfn title="dom-navigator-userLanguage"><code>userLanguage</code></dfn></dt> <!- - Opera and IE only - ->
-   <dt><dfn title="dom-navigator-language"><code>language</code></dfn></dt> <!- - Opera, Safari, and Mozilla only - ->
-   <dd><p>Must return either null or a language tag representing the user's preferred language.</p></dd>
-   -->
-
   </div>
 
 
@@ -88345,6 +88338,7 @@
 
   </dl>
 
+  <!-- similar paragraph in next section -->
   <p class="warning">Any information in this API that varies from user
   to user can be used to profile the user. In fact, if enough such
   information is available, a user can actually be uniquely
@@ -88355,7 +88349,51 @@
 
   </div>
 
+  <!-- next section refers to previous section as "previous section" -->
 
+  <h5>Language preferences</h5>
+
+  <pre class="idl">[NoInterfaceObject]
+interface <dfn>NavigatorLanguage</dfn> {
+  readonly attribute DOMString? <span title="dom-navigator-language">language</span>;
+};</pre>
+
+  <dl class="domintro">
+
+   <dt><var title="">window</var> . <code title="dom-navigator">navigator</code> . <code title="dom-navigator-language">language</code></dt>
+   <dd>
+    <p>Returns a language tag representing the user's preferred language.</p>
+   </dd>
+
+  </dl>
+
+  <div class="impl">
+
+  <dl>
+
+   <!--
+   <dt><dfn title="dom-navigator-browserLanguage"><code>browserLanguage</code></dfn></dt> <!- - Opera and IE only - ->
+   <dd><p>Must return either null or a language tag representing the language the browser uses in its interface.</p></dd>
+
+
+   <dt><dfn title="dom-navigator-userLanguage"><code>userLanguage</code></dfn></dt> <!- - Opera and IE only - ->
+   -->
+   <!-- at time of testing, this was supported by Opera, Safari, and Mozilla only -->
+   <dt><dfn title="dom-navigator-language"><code>language</code></dfn></dt>
+   <dd><p>Must return either null or a language tag representing the user's preferred language.</p></dd>
+
+  </dl>
+
+  <p class="warning">As for the API in the previous section, any information in this API that varies
+  from user to user can be used to profile or identify the user. For this reason, user agent
+  implementors are encouraged to return null unless the user has explicitly indicated that the site
+  in question is allowed access to the information.
+  <!--INSERT FINGERPRINT-->
+  </p>
+
+  </div>
+
+
   <h5 id="custom-handlers">Custom scheme and content handlers</h5>
 
   <pre class="idl">[NoInterfaceObject]
@@ -94057,6 +94095,8 @@
 
 <!--END dev-html-->
 
+<!--ADD-TOPIC:Workers-->
+
   <h2 id="workers">Web workers</h2>
 
 <!--START workers-->
@@ -95901,16 +95941,9 @@
 
   <pre class="idl">interface <dfn>WorkerNavigator</dfn> {};
 <span>WorkerNavigator</span> implements <span>NavigatorID</span>;
+<span>WorkerNavigator</span> implements <span>NavigatorLanguage</span>;
 <span>WorkerNavigator</span> implements <span>NavigatorOnLine</span>;</pre>
 
-  <p>Objects implementing the <code>WorkerNavigator</code> interface
-  also implement the <code>NavigatorID</code> and
-  <code>NavigatorOnLine</code> interfaces.
-  <!--END complete-->
-  <a href="#refsHTML">[HTML]</a>
-  <!--START complete-->
-  </p>
-
   <p>The <code>WorkerNavigator</code> interface must only be <span
   title="expose">exposed</span> if the <span>JavaScript global
   environment</span> is a <span>worker environment</span>.</p>
@@ -96002,8 +96035,8 @@
 
 
 <!--END workers-->
+<!--REMOVE-TOPIC:Workers-->
 
-
 <!--START dev-html-->
 
   <h2 id="comms">Communication</h2>




More information about the Commit-Watchers mailing list