Skip to content

Commit

Permalink
Merge pull request #1212 from Ivshti/master
Browse files Browse the repository at this point in the history
browser-support: warn about the performance hit of the polyfill
  • Loading branch information
alexcrichton authored Jan 28, 2019
2 parents 3e52802 + b3e97a7 commit 03e52c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions guide/src/reference/browser-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 03e52c7

Please sign in to comment.