aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/windoworworkerglobalscope
diff options
context:
space:
mode:
authorFlorian Merz <me@fiji-flo.de>2021-02-11 12:07:59 +0100
committerFlorian Merz <me@fiji-flo.de>2021-02-11 12:07:59 +0100
commit6ef1fa4618e08426b874529619a66adbd3d1fcf0 (patch)
tree890e3e27131be010d82ef957fa68db495006cb0e /files/ja/web/api/windoworworkerglobalscope
parent8260a606c143e6b55a467edf017a56bdcd6cba7e (diff)
downloadtranslated-content-6ef1fa4618e08426b874529619a66adbd3d1fcf0.tar.gz
translated-content-6ef1fa4618e08426b874529619a66adbd3d1fcf0.tar.bz2
translated-content-6ef1fa4618e08426b874529619a66adbd3d1fcf0.zip
unslug ja: move
Diffstat (limited to 'files/ja/web/api/windoworworkerglobalscope')
-rw-r--r--files/ja/web/api/windoworworkerglobalscope/atob/index.html93
-rw-r--r--files/ja/web/api/windoworworkerglobalscope/caches/index.html82
-rw-r--r--files/ja/web/api/windoworworkerglobalscope/clearinterval/index.html122
3 files changed, 297 insertions, 0 deletions
diff --git a/files/ja/web/api/windoworworkerglobalscope/atob/index.html b/files/ja/web/api/windoworworkerglobalscope/atob/index.html
new file mode 100644
index 0000000000..e36c89b054
--- /dev/null
+++ b/files/ja/web/api/windoworworkerglobalscope/atob/index.html
@@ -0,0 +1,93 @@
+---
+title: WindowOrWorkerGlobalScope.atob()
+slug: Web/API/WindowBase64/atob
+tags:
+ - API
+ - HTML DOM
+ - Method
+ - Reference
+ - WindowOrWorkerGlobalScope
+ - atob
+translation_of: Web/API/WindowOrWorkerGlobalScope/atob
+---
+<p>{{APIRef("HTML DOM")}}</p>
+
+<p><strong><code>WindowOrWorkerGlobalScope.atob()</code></strong> 関数は、 {{glossary("Base64")}} エンコーディングでエンコードされたデータの文字列をデコードします。 {{domxref("WindowOrWorkerGlobalScope.btoa","btoa()")}} メソッドを使用して、通信に問題が発生する可能性のあるデータをエンコードして送信し、送信した後に <code>atob()</code> メソッドを使用して再度デコードすることができます。例えば、ASCII の 0 から 31 までのコードような制御文字をエンコードして送信し、デコードすることができます。</p>
+
+<p>Unicode や UTF-8 文字列の使用については、 {{domxref("WindowOrWorkerGlobalScope.btoa", "btoa()")}} の「Uncode 文字列」の節を参照してください。</p>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<pre class="syntaxbox notranslate">var <var>decodedData</var> = scope.atob(<var>encodedData</var>);</pre>
+
+<h3 id="Parameters" name="Parameters">引数</h3>
+
+<dl>
+ <dt><code><var>encodedData</var></code></dt>
+ <dd>エンコードされたデータが入っている<a href="/ja/docs/Web/API/DOMString/Binary">バイナリ文字列</a>です。</dd>
+</dl>
+
+<h3 id="Return_value" name="Return_value">返値</h3>
+
+<p><code><var>encodedData</var></code> をデコードしたデータを含む ASCII 文字列です。</p>
+
+<h3 id="Exceptions" name="Exceptions">例外</h3>
+
+<dl>
+ <dt>{{domxref("DOMException")}} (name: <code>InvalidCharacterError</code>)</dt>
+ <dd><code><var>encodedData</var></code> が妥当な base64 ではない場合に発行されます。</dd>
+</dl>
+
+<h2 id="Example" name="Example">例</h2>
+
+<pre class="brush:js notranslate">const encodedData = window.btoa('Hello, world'); // 文字列をエンコード
+const decodedData = window.atob(encodedData); // 文字列をデコード</pre>
+
+<h2 id="Polyfill" name="Polyfill">ポリフィル</h2>
+
+<p>対応していないブラウザーでは、 <a href="https://github.com/MaxArt2501/base64-js/blob/master/base64.js">https://github.com/MaxArt2501/base64-js/blob/master/base64.js</a> のポリフィルを利用することができます。</p>
+
+<h2 id="Specifications" name="Specifications">仕様書</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">仕様書</th>
+ <th scope="col">状態</th>
+ <th scope="col">備考</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', '#dom-atob', 'WindowOrWorkerGlobalScope.atob()')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>最新の仕様で、メソッドを <code>WindowOrWorkerGlobalScope</code> ミックスインに移動。</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5.1', '#dom-windowbase64-atob', 'WindowBase64.atob()')}}</td>
+ <td>{{Spec2('HTML5.1')}}</td>
+ <td>{{SpecName("HTML WHATWG")}} のスナップショット、変更なし。</td>
+ </tr>
+ <tr>
+ <td>{{SpecName("HTML5 W3C", "#dom-windowbase64-atob", "WindowBase64.atob()")}}</td>
+ <td>{{Spec2('HTML5 W3C')}}</td>
+ <td>{{SpecName("HTML WHATWG")}} のスナップショット。 <code>WindowBase64</code> の作成 (以前の対象だったプロパティ)。</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+
+<div>
+<div class="hidden">このページの互換性表は構造化データから作成されています。データに協力したい場合は、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送ってください。</div>
+
+<p>{{Compat("api.WindowOrWorkerGlobalScope.atob")}}</p>
+</div>
+
+<h2 id="See_also" name="See_also">関連情報</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs"><code>data</code> URIs</a></li>
+ <li>{{domxref("WindowOrWorkerGlobalScope.btoa","btoa()")}}</li>
+ <li><a href="/ja/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.importGlobalProperties">Components.utils.importGlobalProperties</a></li>
+</ul>
diff --git a/files/ja/web/api/windoworworkerglobalscope/caches/index.html b/files/ja/web/api/windoworworkerglobalscope/caches/index.html
new file mode 100644
index 0000000000..5d4002bd19
--- /dev/null
+++ b/files/ja/web/api/windoworworkerglobalscope/caches/index.html
@@ -0,0 +1,82 @@
+---
+title: WorkerGlobalScope.caches
+slug: Web/API/WorkerGlobalScope/caches
+tags:
+ - API
+ - Experimental
+ - Property
+ - Read-only
+ - Reference
+ - Service Workers
+ - Web Workers
+ - Window
+ - WindowOrWorkerGlobalScope
+translation_of: Web/API/WindowOrWorkerGlobalScope/caches
+---
+<div>{{APIRef()}}{{SeeCompatTable}}</div>
+
+<p>{{domxref("WindowOrWorkerGlobalScope")}} インターフェイスの <code><strong>caches</strong></code> 読み取り専用プロパティは、現在のワーカーコンテキストに関連する {{domxref("CacheStorage")}} オブジェクトを返します。このオブジェクトにより、オフライン利用のために資産 (assets、アセット) を保存したり、リクエストに対するカスタムレスポンスを生成したりするなどの機能を使用できます。</p>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<pre class="syntaxbox">var <em>myCacheStorage</em> = self.caches; // または単に caches
+</pre>
+
+<h3 id="Value" name="Value">値</h3>
+
+<p>{{domxref("CacheStorage")}}。</p>
+
+<h2 id="Example" name="Example">例</h2>
+
+<p>次の例では、アセットをオフラインで利用できるようにするために、<a href="/ja/docs/Web/API/Service_Worker_API">ServiceWorker</a> コンテキストでキャッシュを使う方法を示しています。</p>
+
+<pre class="brush: js">this.addEventListener('install', function(event) {
+ event.waitUntil(
+ caches.open('v1').then(function(cache) {
+ return cache.addAll(
+ '/sw-test/',
+ '/sw-test/index.html',
+ '/sw-test/style.css',
+ '/sw-test/app.js',
+ '/sw-test/image-list.js',
+ '/sw-test/star-wars-logo.jpg',
+ '/sw-test/gallery/',
+ '/sw-test/gallery/bountyHunters.jpg',
+ '/sw-test/gallery/myLittleVader.jpg',
+ '/sw-test/gallery/snowTroopers.jpg'
+ );
+ })
+ );
+});</pre>
+
+<h2 id="Specifications" name="Specifications">仕様</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">仕様</th>
+ <th scope="col">ステータス</th>
+ <th scope="col">コメント</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Service Workers')}}</td>
+ <td>{{Spec2('Service Workers')}}</td>
+ <td>初期定義。</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザー実装状況</h2>
+
+
+
+<p>{{Compat("api.WindowOrWorkerGlobalScope.caches")}}</p>
+
+<h2 id="See_also" name="See_also">関連項目</h2>
+
+<ul>
+ <li><a href="/ja/docs/Web/API/ServiceWorker_API">Service Workers</a></li>
+ <li><a href="/ja/docs/Web/API/Web_Workers_API">Web Workers</a></li>
+ <li>{{domxref("CacheStorage")}}</li>
+ <li>{{domxref("Cache")}}</li>
+</ul>
diff --git a/files/ja/web/api/windoworworkerglobalscope/clearinterval/index.html b/files/ja/web/api/windoworworkerglobalscope/clearinterval/index.html
new file mode 100644
index 0000000000..ceb7c2ebbe
--- /dev/null
+++ b/files/ja/web/api/windoworworkerglobalscope/clearinterval/index.html
@@ -0,0 +1,122 @@
+---
+title: window.clearInterval
+slug: Web/API/WindowTimers/clearInterval
+tags:
+ - DOM
+ - DOM_0
+ - Gecko
+ - JavaScript timers
+ - Window
+translation_of: Web/API/WindowOrWorkerGlobalScope/clearInterval
+---
+<div>{{ApiRef}}</div>
+
+<h2 id="Summary" name="Summary">概要</h2>
+
+<p>{{domxref("window.setInterval", "setInterval")}} を使用して設定された繰り返し動作をキャンセルします。</p>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<pre class="syntaxbox"><em>window</em>.clearInterval(<var>intervalID</var>)
+</pre>
+
+<ul>
+ <li><code>intervalID</code>: キャンセルする繰り返し動作の識別子。この ID は <code>setInterval()</code> の戻り値です。</li>
+</ul>
+
+<h2 id="Example" name="Example">例</h2>
+
+<p>{{domxref("window.setInterval", "setInterval()", "example")}} の例を参照して下さい。</p>
+
+<h2 id="Specification" name="Specification">仕様</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th>仕様書</th>
+ <th>策定状況</th>
+ <th>コメント</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'webappapis.html#dom-setInterval', 'WindowOrWorkerGlobalScope.clearInterval()')}}</td>
+ <td>{{Spec2("HTML WHATWG")}}</td>
+ <td>最新の仕様で、メソッドを <code>WindowOrWorkerGlobalScope</code> ミックスインに移動。</td>
+ </tr>
+ <tr>
+ <td>{{SpecName("HTML WHATWG", "webappapis.html#dom-setInterval", "WindowTimers.setInterval()")}}</td>
+ <td>{{Spec2("HTML WHATWG")}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザー実装状況</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>機能</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>基本サポート</td>
+ <td>1.0</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop("1")}}<br>
+ {{CompatGeckoDesktop("52")}}<sup>[1]</sup></td>
+ <td>4.0</td>
+ <td>4.0</td>
+ <td>1.0</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>機能</th>
+ <th>Android</th>
+ <th>Android 版 Chrome</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>基本サポート</td>
+ <td>1.0</td>
+ <td>1.0</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoMobile("1")}}<br>
+ {{CompatGeckoMobile("52")}}<sup>[1]</sup></td>
+ <td>6.0</td>
+ <td>6.0</td>
+ <td>1.0</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] clearInterval() は現在継承され{{domxref("WindowOrWorkerGlobalScope")}}に定義されています.</p>
+
+<h2 id="See_also" name="See_also">関連情報</h2>
+
+<ul>
+ <li><a href="/ja/docs/JavaScript/Timers" title="JavaScript/Timers">JavaScript timers</a></li>
+ <li>{{domxref("window.setTimeout")}}</li>
+ <li>{{domxref("window.setInterval")}}</li>
+ <li>{{domxref("window.clearTimeout")}}</li>
+ <li>{{domxref("window.requestAnimationFrame")}}</li>
+ <li><a href="/ja/docs/JavaScript/Timers/Daemons"><em>Daemons</em> management</a></li>
+</ul>