aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/javascript/reference/global_objects/webassembly/compilestreaming/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/javascript/reference/global_objects/webassembly/compilestreaming/index.html')
-rw-r--r--files/ja/web/javascript/reference/global_objects/webassembly/compilestreaming/index.html77
1 files changed, 0 insertions, 77 deletions
diff --git a/files/ja/web/javascript/reference/global_objects/webassembly/compilestreaming/index.html b/files/ja/web/javascript/reference/global_objects/webassembly/compilestreaming/index.html
deleted file mode 100644
index e3048ea38f..0000000000
--- a/files/ja/web/javascript/reference/global_objects/webassembly/compilestreaming/index.html
+++ /dev/null
@@ -1,77 +0,0 @@
----
-title: WebAssembly.compileStreaming()
-slug: Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming
-translation_of: Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming
----
-<div>{{JSRef}} {{SeeCompatTable}}</div>
-
-<p><strong><code>WebAssembly.compileStreaming()</code></strong> 関数はソースのストリームから直接 {{jsxref("WebAssembly.Module")}} にコンパイルします。この関数はモジュールをインスタンス化する前にコンパイルする必要がある場合に役立ちます (そうでない場合は、{{jsxref("WebAssembly.instantiateStreaming()")}} 関数の仕様が推奨されます)。</p>
-
-<h2 id="構文">構文</h2>
-
-<pre class="syntaxbox">Promise&lt;WebAssembly.Module&gt; WebAssembly.compileStreaming(<em>source</em>);</pre>
-
-<h3 id="パラメータ">パラメータ</h3>
-
-<dl>
- <dt><em>source</em></dt>
- <dd>ストリーム、コンパイルする .wasm モジュールのソースコードを表す {{domxref("Response")}} オブジェクトか、それを fulfill するプロミス。 </dd>
-</dl>
-
-<h3 id="戻り値">戻り値</h3>
-
-<p>解決時にコンパイルされたモジュールを表す {{jsxref("WebAssembly.Module")}} を渡す <code>Promise</code> 。</p>
-
-<h3 id="例外">例外</h3>
-
-<ul>
- <li><code>bufferSource</code> が <a href="/ja/docs/Web/JavaScript/Typed_arrays">型付き配列</a> でない場合、 {{jsxref("TypeError")}} がスローされます。</li>
- <li>失敗した場合、プロミスは {{jsxref("WebAssembly.CompileError")}} を持って棄却されます。</li>
-</ul>
-
-<h2 id="例">例</h2>
-
-<p>次の例 (Github上のデモ <a href="https://github.com/mdn/webassembly-examples/blob/master/js-api-examples/compile-streaming.html">compile-streaming.html</a> と、<a href="https://mdn.github.io/webassembly-examples/js-api-examples/compile-streaming.html">動作例</a> を参照してください) では、ソースから直接 .wasm モジュールをストリームして、 {{jsxref("WebAssembly.Module")}} オブジェクトにコンパイルしています。<code>compileStreaming()</code>  関数は {{domxref("Response")}} オブジェクトを渡すプロミスを受け取るので、直接 {{domxref("WindowOrWorkerGlobalScope.fetch()")}} の呼び出し結果を渡すことができます。</p>
-
-<pre class="brush: js">var importObject = { imports: { imported_func: arg =&gt; console.log(arg) } };
-
-WebAssembly.compileStreaming(fetch('simple.wasm'))
-.then(module =&gt; WebAssembly.instantiate(module, importObject))
-.then(instance =&gt; instance.exports.exported_func());</pre>
-
-<p>結果として受け取ったモジュールインスタンスはその後 {{jsxref("WebAssembly.instantiate()")}} を使用してインスタンス化され、エクスポートされた関数が実行されます。</p>
-
-<h2 id="仕様">仕様</h2>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{SpecName('WebAssembly Embedding', '#webassemblycompilestreaming', 'compileStreaming()')}}</td>
- <td>{{Spec2('WebAssembly Embedding')}}</td>
- <td>初回ドラフト定義</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザ実装状況</h2>
-
-<div>
-
-
-<p>{{Compat("javascript.builtins.WebAssembly.compileStreaming")}}</p>
-</div>
-
-<h2 id="関連情報">関連情報</h2>
-
-<ul>
- <li><a href="/ja/docs/WebAssembly">WebAssembly</a> overview page</li>
- <li><a href="/ja/docs/WebAssembly/Concepts">WebAssemblyのコンセプト</a></li>
- <li><a href="/ja/docs/WebAssembly/Using_the_JavaScript_API">WebAssembly JavaScript APIを使用する</a></li>
-</ul>