Skip to content

Commit

Permalink
[giow] (2) Document navigator.language. (Also, add a Workers topic yo…
Browse files Browse the repository at this point in the history
…u can subscribe to. Right now, it's a subset of the DOM APIs topic.)

Affected topics: DOM APIs, HTML, Workers

git-svn-id: http://svn.whatwg.org/webapps@7606 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 30, 2012
1 parent b0b5d7b commit fe6d40b
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 63 deletions.
73 changes: 50 additions & 23 deletions complete.html
Expand Up @@ -979,11 +979,12 @@ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 29 December 2012<
<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>
Expand Down Expand Up @@ -75459,6 +75460,7 @@ <h4 id=the-navigator-object><span class=secno>7.5.1 </span>The <code><a href=#na
// 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>
Expand All @@ -75476,14 +75478,6 @@ <h4 id=the-navigator-object><span class=secno>7.5.1 </span>The <code><a href=#na
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>


Expand Down Expand Up @@ -75563,7 +75557,7 @@ <h5 id=client-identification><span class=secno>7.5.1.1 </span>Client identificat

<!-- 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
Expand All @@ -75573,8 +75567,42 @@ <h5 id=client-identification><span class=secno>7.5.1.1 </span>Client identificat

</div>

<!-- next section refers to previous section as "previous section" -->

<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.2 </span>Custom scheme and content handlers</h5>
<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> {
Expand Down Expand Up @@ -76049,7 +76077,7 @@ <h5 id=custom-handlers><span class=secno>7.5.1.2 </span>Custom scheme and conten
<!--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>
Expand Down Expand Up @@ -76145,7 +76173,7 @@ <h6 id=security-and-privacy><span class=secno>7.5.1.2.1 </span>Security and priv

<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>

Expand Down Expand Up @@ -76191,7 +76219,7 @@ <h6 id=sample-handler-impl><span class=secno>7.5.1.2.2 </span>Sample user interf



<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> {
Expand Down Expand Up @@ -80444,6 +80472,8 @@ <h4 id=security-risks-in-the-drag-and-drop-model><span class=secno>8.7.9 </span>



<!--ADD-TOPIC:Workers-->

<h2 id=workers><span class=secno>9 </span>Web workers</h2>


Expand Down Expand Up @@ -82667,13 +82697,9 @@ <h4 id=importing-scripts-and-libraries><span class=secno>9.3.1 </span>Importing

<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>

Expand Down Expand Up @@ -82748,7 +82774,7 @@ <h4 id=worker-locations><span class=secno>9.3.4 </span>Worker locations</h4>




<!--REMOVE-TOPIC:Workers-->



Expand Down Expand Up @@ -104109,6 +104135,7 @@ <h3 class="no-num">Reflecting IDL attributes</h3>
<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>
Expand Down
73 changes: 50 additions & 23 deletions index
Expand Up @@ -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>
Expand Down Expand Up @@ -75459,6 +75460,7 @@ setTimeout({ toString: function () {
// 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>
Expand All @@ -75476,14 +75478,6 @@ setTimeout({ toString: function () {
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>


Expand Down Expand Up @@ -75563,7 +75557,7 @@ interface <dfn id=navigatorid>NavigatorID</dfn> {<!--

<!-- 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
Expand All @@ -75573,8 +75567,42 @@ interface <dfn id=navigatorid>NavigatorID</dfn> {<!--

</div>

<!-- next section refers to previous section as "previous section" -->

<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.2 </span>Custom scheme and content handlers</h5>
<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> {
Expand Down Expand Up @@ -76049,7 +76077,7 @@ interface <dfn id=navigatorcontentutils>NavigatorContentUtils</dfn> {
<!--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>
Expand Down Expand Up @@ -76145,7 +76173,7 @@ interface <dfn id=navigatorcontentutils>NavigatorContentUtils</dfn> {

<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>

Expand Down Expand Up @@ -76191,7 +76219,7 @@ interface <dfn id=navigatorcontentutils>NavigatorContentUtils</dfn> {



<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> {
Expand Down Expand Up @@ -80444,6 +80472,8 @@ dictionary <dfn id=drageventinit>DragEventInit</dfn> : <a href=#mouseeventinit>M



<!--ADD-TOPIC:Workers-->

<h2 id=workers><span class=secno>9 </span>Web workers</h2>


Expand Down Expand Up @@ -82667,13 +82697,9 @@ interface <dfn id=workerutils>WorkerUtils</dfn> {

<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>

Expand Down Expand Up @@ -82748,7 +82774,7 @@ interface <dfn id=workerutils>WorkerUtils</dfn> {




<!--REMOVE-TOPIC:Workers-->



Expand Down Expand Up @@ -104109,6 +104135,7 @@ if (s = prompt('What is your name?')) {
<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>
Expand Down

0 comments on commit fe6d40b

Please sign in to comment.