Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 595485 of L10n.readyState

  • Revision slug: Web/API/L10n.readyState
  • Revision title: L10n.readyState
  • Revision id: 595485
  • Created:
  • Creator: chrisdavidmills
  • Is current revision? No
  • Comment

Revision Content

{{ non-standard_header() }}
 

The readyState property returns either loading or complete — depending on the current state of the L10n context.

readyState should be used sparingly;  L10n.ready() and L10n.once() are usually better suited for controlling when code is run relative to the state of the localization.

Syntax

var readyState = navigator.mozL10n.readyState;

Value

Returns loading or complete.

Example

console.log('Localization is ' + navigator.mozL10n.readyState);

Specification

Not part of any specification.

See also

  • {{domxref("L10n")}}
  • {{domxref("L10n.ready")}}
  • {{domxref("L10n.once")}}

Revision Source

<div class="syntaxbox">
 {{ non-standard_header() }}</div>
<div class="syntaxbox">
 &nbsp;</div>
<div class="summary">
 <p><span class="seoSummary">The <code>readyState</code> property returns either <code>loading</code> or <code>complete</code> — depending on the current state of the <a href="/en-US/docs/Web/API/L10n">L10n</a> context.</span></p>
</div>
<p><code>readyState</code> should be used sparingly;&nbsp; <a href="/en-US/docs/Web/API/L10n.ready"><code>L10n.ready()</code></a> and <a href="/en-US/docs/Web/API/L10n.once"><code>L10n.once()</code></a> are usually better suited for controlling when code is run relative to the state of the localization.</p>
<h2 id="Syntax">Syntax</h2>
<pre class="syntaxbox">
var readyState = navigator.mozL10n.readyState;</pre>
<h2 id="Value">Value</h2>
<p>Returns <code>loading</code> or <code>complete</code>.</p>
<h2 id="Example">Example</h2>
<pre class="brush: js">
console.log('Localization is ' + navigator.mozL10n.readyState);
</pre>
<h2 id="Specification" name="Specification">Specification</h2>
<p>Not part of any specification.</p>
<h2 id="See_also">See also</h2>
<ul>
 <li>{{domxref("L10n")}}</li>
 <li>{{domxref("L10n.ready")}}</li>
 <li>{{domxref("L10n.once")}}</li>
</ul>
Revert to this revision