Merge pull request #1212 from Ivshti/master

browser-support: warn about the performance hit of the polyfill
This commit is contained in:
Alex Crichton 2019-01-28 14:30:07 -06:00 committed by GitHub
commit 03e52c7045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,10 @@ also like to be aware of it!
};
```
**Warning:** doing this implies the polyfill will always be used,
even if native APIs are available. This has a very significant
performance impact (the polyfill was measured to be 100x slower in Chromium)!
2. If you're not using a bundler you can also include support manually by
adding a `<script>` tag which defines the `TextEncoder` and `TextDecoder`
globals. [This StackOverflow question][soq] has some example usage and MDN