Skip to content

Commit

Permalink
misc/wasm: add polyfill for TextEncoder/TextDecoder for Edge support
Browse files Browse the repository at this point in the history
Edge supports WASM but not TextEncoder or TextDecoder.
This PR adds a polyfill to `misc/wasm/wasm_exec.js` to fix this.

Fixes #27295

Change-Id: Ie35ee5604529b170a5dc380eb286f71bdd691d3e
GitHub-Last-Rev: a587eda
GitHub-Pull-Request: #27296
Reviewed-on: https://go-review.googlesource.com/131718
Reviewed-by: Agniva De Sarker <[email protected]>
Reviewed-by: Richard Musiol <[email protected]>
  • Loading branch information
silbinarywolf authored and Richard Musiol committed Sep 29, 2018
1 parent d1f7470 commit a0e7f12
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>
<!--
Polyfill for TextEncoder and TextDecoder for Microsoft Edge 17/18 support
https://caniuse.com/#feat=textencoder
-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/encoding.min.js"></script>
<script src="wasm_exec.js"></script>
<script>
if (!WebAssembly.instantiateStreaming) { // polyfill
Expand Down

0 comments on commit a0e7f12

Please sign in to comment.