Skip to content

Commit

Permalink
[release-branch.go1.11] misc/wasm: add mention of polyfill for Edge s…
Browse files Browse the repository at this point in the history
…upport

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 <[email protected]>
(cherry picked from commit cfb603b0b5fb9c1e72be665b2d65743ddf18c779)
Reviewed-on: https://go-review.googlesource.com/139057
Reviewed-by: Richard Musiol <[email protected]>
  • Loading branch information
neelance authored and bradfitz committed Oct 2, 2018
1 parent 2695716 commit e9c178d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions misc/wasm/wasm_exec.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
</head>

<body>
<!--
Add the following polyfill for Microsoft Edge 17/18 support:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/encoding.min.js"></script>
(see https://caniuse.com/#feat=textencoder)
-->
<script src="wasm_exec.js"></script>
<script>
if (!WebAssembly.instantiateStreaming) { // polyfill
Expand Down

0 comments on commit e9c178d

Please sign in to comment.