]> Cypherpunks repositories - gostls13.git/commitdiff
misc/wasm: add mention of polyfill for Edge support
authorRichard Musiol <mail@richard-musiol.de>
Tue, 2 Oct 2018 17:11:14 +0000 (19:11 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 2 Oct 2018 17:25:11 +0000 (17:25 +0000)
Edge supports WebAssembly but not TextEncoder or TextDecoder.
This change adds a comment pointing to a polyfill that could
be used. The polyfill is not added by default, because we want to
let the user decide if/how to include the polyfill.

Fixes #27295

Change-Id: I375f58f2168665f549997b368428c398dfbbca1c
Reviewed-on: https://go-review.googlesource.com/139037
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
misc/wasm/wasm_exec.html

index f5e21e40f335b1e180c69999cde5868c35bfe260..72e64473eb588d231aff3cd29e7ae0ab5c3b24ac 100644 (file)
@@ -12,6 +12,11 @@ license that can be found in the LICENSE file.
 </head>
 
 <body>
+       <!--
+       Add the following polyfill for Microsoft Edge 17/18 support:
+       <script src="https://cdn.jsdelivr.net/npm/text-encoding@0.7.0/lib/encoding.min.js"></script>
+       (see https://caniuse.com/#feat=textencoder)
+       -->
        <script src="wasm_exec.js"></script>
        <script>
                if (!WebAssembly.instantiateStreaming) { // polyfill