diff options
Diffstat (limited to 'files/ja/web/api/fmradio/enable/index.html')
-rw-r--r-- | files/ja/web/api/fmradio/enable/index.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/files/ja/web/api/fmradio/enable/index.html b/files/ja/web/api/fmradio/enable/index.html new file mode 100644 index 0000000000..323607f8ad --- /dev/null +++ b/files/ja/web/api/fmradio/enable/index.html @@ -0,0 +1,49 @@ +--- +title: FMRadio.enable +slug: Web/API/FMRadio/enable +tags: + - API + - B2G + - Firefox OS + - Method + - Non Standard + - Reference + - WebAPI + - WebFM +translation_of: Archive/B2G_OS/API/FMRadio/enable +--- +<p>{{ non-standard_header() }}</p> +<p>{{ B2GOnlyHeader2('installed') }}</p> +<h2 id="概要">概要</h2> +<p><code>enable</code> メソッドは、与えられた周波数でラジオを ON にするために使用します。</p> +<p>この関数は、引数なしで呼び出された場合、エラーを投げます。</p> +<p>このメソッドの呼び出しが成功した時に、毎回 {{event("enabled")}} イベントと {{event("frequencychange")}} イベントが発生します。</p> +<h2 id="構文">構文</h2> +<pre>var request = <em>instanceOfFMRadio</em>.enable(frequency);</pre> +<h3 id="引数">引数</h3> +<dl> + <dt> + <code>frenquency</code></dt> + <dd> + ラジオが受信する信号の周波数の値。</dd> +</dl> +<h3 id="戻り値">戻り値</h3> +<p>命令の成功またはエラーを扱う <a href="/docs/Web/API/DOMRequest" title="/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> を返します。</p> +<h2 id="例">例</h2> +<pre class="brush: js">var request = navigator.mozFMRadio.enable(100.0); + +request.onsuccess = function () { + console.log("The radio is enable"); +} + +request.onerror = function () { + console.log("Something goes wrong!"); +} +</pre> +<h2 id="Specification" name="Specification">仕様書</h2> +<p>仕様はありません。</p> +<h2 id="参照">参照</h2> +<ul> + <li>{{domxref("FMRadio")}}</li> + <li>{{domxref("FMRadio.enabled")}}</li> +</ul> |