Skip to content

Commit d6228e6

Browse files
authored
Update browser support caveats (#2441)
* Update browser support caveats - Edge 79+ supports `TextEncoder and `TextDecoder` APIs (https://caniuse.com/textencoder) - Edge 79+ and Safari 14+ supports BigInt (https://caniuse.com/bigint) * Keep sections and specify support starting on version
1 parent 920494c commit d6228e6

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

guide/src/reference/browser-support.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ also like to be aware of it!
1919
an example of doing this too](../examples/wasm2js.html)). Note
2020
that at this time no bundler will do this by default, but we'd love to
2121
document plugins which do this if you are aware of one!
22-
23-
* **Edge** - the `TextEncoder` and `TextDecoder` APIs are not currently
22+
23+
* **Edge before 79+** - the `TextEncoder` and `TextDecoder` APIs where not
2424
available in Edge which `wasm-bindgen` uses to encode/decode strings between
2525
JS and Rust. You can polyfill this with at least one of two strategies:
2626

@@ -31,15 +31,13 @@ also like to be aware of it!
3131

3232
```js
3333
const webpack = require('webpack');
34-
3534
module.exports = {
3635
plugins: [
3736
new webpack.ProvidePlugin({
3837
TextDecoder: ['text-encoding', 'TextDecoder'],
3938
TextEncoder: ['text-encoding', 'TextEncoder']
4039
})
4140
]
42-
4341
// ... other configuration options
4442
};
4543
```
@@ -58,10 +56,9 @@ also like to be aware of it!
5856
forbids the usage of 64-bit integers (Rust types `i64` and `u64`) in
5957
exported/imported functions. When using `wasm-bindgen`, however, `u64` is
6058
allowed! The reason for this is that it's translated to the `BigInt` type in
61-
JS. The `BigInt` class, however, is only currently supported in Chrome 67+ and
62-
Firefox 68+ (as of the time of this writing) and isn't supported in Edge or
63-
Safari, for example. For more, up-to-date details, see [`BigInt` on Can I
64-
use...][ciu_bigint].
59+
JS. The `BigInt` class is supported by all major browsers starting in the
60+
following versions: Chrome 67+, Firefox 68+, Edge 79+, and Safari 14+.
61+
6562

6663
If you find other incompatibilities please report them to us! We'd love to
6764
either keep this list up-to-date or fix the underlying bugs :)
@@ -72,4 +69,3 @@ either keep this list up-to-date or fix the underlying bugs :)
7269
[`text-encoding`]: https://www.npmjs.com/package/text-encoding
7370
[soq]: https://stackoverflow.com/questions/40662142/polyfill-for-textdecoder/46549188#46549188
7471
[mdntepi]: https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder#Polyfill
75-
[ciu_bigint]: https://caniuse.com/#feat=bigint

0 commit comments

Comments
 (0)