From 2a6d2004e17f993a02f4d212292258182a2f362b Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 24 Jan 2019 15:35:21 -0800 Subject: [PATCH 01/13] minor typo in js-sys lib.rs --- crates/js-sys/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/js-sys/src/lib.rs b/crates/js-sys/src/lib.rs index cf70f351..556b827f 100644 --- a/crates/js-sys/src/lib.rs +++ b/crates/js-sys/src/lib.rs @@ -4841,7 +4841,7 @@ macro_rules! arrays { /// Additionally the returned object can be safely mutated but the /// input slice isn't guaranteed to be mutable. /// - /// Finally, the returned objet is disconnected from the input + /// Finally, the returned object is disconnected from the input /// slice's lifetime, so there's no guarantee that the data is read /// at the right time. pub unsafe fn view(rust: &[$ty]) -> $name { From b3e97a7e45758735fbda111cdff8dab2594253d9 Mon Sep 17 00:00:00 2001 From: Ivo Georgiev Date: Mon, 28 Jan 2019 20:55:11 +0100 Subject: [PATCH 02/13] browser-support: warn about the performance hit of using the polyfill~ --- guide/src/reference/browser-support.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guide/src/reference/browser-support.md b/guide/src/reference/browser-support.md index 7362ea61..c9f4c5b7 100644 --- a/guide/src/reference/browser-support.md +++ b/guide/src/reference/browser-support.md @@ -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 `