Repository: rustwasm/wasm-bindgen
Pull request #3828 (2024-02-06 10:27:45)

Add `RTCRtpTransceiver.setCodecPreferences()`
This PR adds [spec compliant](https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-setcodecpreferences) bindings for `RTCRtpTransceiver.setCodecPreferences()` method and [unstable](https://www.w3.org/TR/webrtc-svc/#rtcrtpencodingparameters) field `RTCRtpEncodingParameters.scalabilityMode`. Also makes `RTCRtpCodec`, `RTCRtpCodecParameters` and `RTCRtpCodecCapability` [spec compliant](https://w3c.github.io/webrtc-pc/#dom-rtcrtpcodec). 

logist322: @daxpedda Hi! I consider it's ready for review.

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ff30f9e..82822847 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,14 +1,19 @@
 # `wasm-bindgen` Change Log
 --------------------------------------------------------------------------------
 
-## Unreleased
+## [0.2.91](https://github.com/rustwasm/wasm-bindgen/compare/0.2.90...0.2.91)
+
+Released 2024-02-06
 
 ### Added
 
+* Added bindings for the `RTCRtpTransceiver.setCodecPreferences()` and unstable bindings for the `RTCRtpEncodingParameters.scalabilityMode`.
+  [#3828](https://github.com/rustwasm/wasm-bindgen/pull/3828)
+
 * Add unstable bindings for the FileSystemAccess API
   [#3810](https://github.com/rustwasm/wasm-bindgen/pull/3810)
 
-* Added support for running tests in shared and service workers with ``wasm_bindgen_test_configure!` `run_in_shared_worker` and `run_in_service_worker`.
+* Added support for running tests in shared and service workers with `wasm_bindgen_test_configure!` `run_in_shared_worker` and `run_in_service_worker`.
   [#3804](https://github.com/rustwasm/wasm-bindgen/pull/3804)
 
 * Accept the `--skip` flag with `wasm-bindgen-test-runner`.
diff --git a/Cargo.toml b/Cargo.toml
index b1faa4e8..08cd2dfa 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen Developers"]
 license = "MIT OR Apache-2.0"
 readme = "README.md"
@@ -42,15 +42,15 @@ xxx_debug_only_print_generated_code = [
 ]
 
 [dependencies]
-wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.90" }
+wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.91" }
 serde = { version = "1.0", optional = true }
 serde_json = { version = "1.0", optional = true }
 cfg-if = "1.0.0"
 
 [target.'cfg(target_arch = "wasm32")'.dev-dependencies]
-js-sys = { path = 'crates/js-sys', version = '0.3.67' }
-wasm-bindgen-test = { path = 'crates/test', version = '=0.3.40' }
-wasm-bindgen-futures = { path = 'crates/futures', version = '=0.4.40' }
+js-sys = { path = 'crates/js-sys', version = '0.3.68' }
+wasm-bindgen-test = { path = 'crates/test', version = '=0.3.41' }
+wasm-bindgen-futures = { path = 'crates/futures', version = '=0.4.41' }
 serde_derive = "1.0"
 wasm-bindgen-test-crate-a = { path = 'tests/crates/a', version = '0.1' }
 wasm-bindgen-test-crate-b = { path = 'tests/crates/b', version = '0.1' }
diff --git a/crates/backend/Cargo.toml b/crates/backend/Cargo.toml
index 8be4e953..b2dccbbb 100644
--- a/crates/backend/Cargo.toml
+++ b/crates/backend/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-backend"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen Developers"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/backend"
@@ -23,4 +23,4 @@ once_cell = "1.12"
 proc-macro2 = "1.0"
 quote = '1.0'
 syn = { version = '2.0', features = ['full'] }
-wasm-bindgen-shared = { path = "../shared", version = "=0.2.90" }
+wasm-bindgen-shared = { path = "../shared", version = "=0.2.91" }
diff --git a/crates/cli-support/Cargo.toml b/crates/cli-support/Cargo.toml
index 0dae8e03..ec12dc3d 100644
--- a/crates/cli-support/Cargo.toml
+++ b/crates/cli-support/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-cli-support"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen Developers"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/cli-support"
@@ -20,10 +20,10 @@ rustc-demangle = "0.1.13"
 serde_json = "1.0"
 tempfile = "3.0"
 walrus = "0.20.2"
-wasm-bindgen-externref-xform = { path = '../externref-xform', version = '=0.2.90' }
-wasm-bindgen-multi-value-xform = { path = '../multi-value-xform', version = '=0.2.90' }
-wasm-bindgen-shared = { path = "../shared", version = '=0.2.90' }
-wasm-bindgen-threads-xform = { path = '../threads-xform', version = '=0.2.90' }
-wasm-bindgen-wasm-conventions = { path = '../wasm-conventions', version = '=0.2.90' }
-wasm-bindgen-wasm-interpreter = { path = "../wasm-interpreter", version = '=0.2.90' }
+wasm-bindgen-externref-xform = { path = '../externref-xform', version = '=0.2.91' }
+wasm-bindgen-multi-value-xform = { path = '../multi-value-xform', version = '=0.2.91' }
+wasm-bindgen-shared = { path = "../shared", version = '=0.2.91' }
+wasm-bindgen-threads-xform = { path = '../threads-xform', version = '=0.2.91' }
+wasm-bindgen-wasm-conventions = { path = '../wasm-conventions', version = '=0.2.91' }
+wasm-bindgen-wasm-interpreter = { path = "../wasm-interpreter", version = '=0.2.91' }
 unicode-ident = "1.0.5"
diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml
index e7d09100..81f27693 100644
--- a/crates/cli/Cargo.toml
+++ b/crates/cli/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-cli"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen Developers"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/cli"
@@ -34,8 +34,8 @@ ureq = { version = "2.7", default-features = false, features = [
     "gzip",
 ] }
 walrus = { version = "0.20.2", features = ['parallel'] }
-wasm-bindgen-cli-support = { path = "../cli-support", version = "=0.2.90" }
-wasm-bindgen-shared = { path = "../shared", version = "=0.2.90" }
+wasm-bindgen-cli-support = { path = "../cli-support", version = "=0.2.91" }
+wasm-bindgen-shared = { path = "../shared", version = "=0.2.91" }
 
 [dev-dependencies]
 assert_cmd = "1.0"
diff --git a/crates/externref-xform/Cargo.toml b/crates/externref-xform/Cargo.toml
index d1082290..0b5f80f3 100644
--- a/crates/externref-xform/Cargo.toml
+++ b/crates/externref-xform/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-externref-xform"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen Developers"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/externref-xform"
diff --git a/crates/futures/Cargo.toml b/crates/futures/Cargo.toml
index f5462b2a..860e6d74 100644
--- a/crates/futures/Cargo.toml
+++ b/crates/futures/Cargo.toml
@@ -7,14 +7,14 @@ license = "MIT OR Apache-2.0"
 name = "wasm-bindgen-futures"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/futures"
 readme = "./README.md"
-version = "0.4.40"
+version = "0.4.41"
 edition = "2018"
 rust-version = "1.57"
 
 [dependencies]
 cfg-if = "1.0.0"
-js-sys = { path = "../js-sys", version = '0.3.67' }
-wasm-bindgen = { path = "../..", version = '0.2.90' }
+js-sys = { path = "../js-sys", version = '0.3.68' }
+wasm-bindgen = { path = "../..", version = '0.2.91' }
 futures-core =  { version = '0.3.8', default-features = false, optional = true }
 
 [features]
@@ -29,6 +29,6 @@ features = [
 ]
 
 [target.'cfg(target_arch = "wasm32")'.dev-dependencies]
-wasm-bindgen-test = { path = '../test', version = '0.3.40' }
+wasm-bindgen-test = { path = '../test', version = '0.3.41' }
 futures-channel-preview = { version = "0.3.0-alpha.18" }
 futures-lite = { version = "1.11.3", default-features = false }
diff --git a/crates/js-sys/Cargo.toml b/crates/js-sys/Cargo.toml
index 80a940af..ca5f849f 100644
--- a/crates/js-sys/Cargo.toml
+++ b/crates/js-sys/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "js-sys"
-version = "0.3.67"
+version = "0.3.68"
 authors = ["The wasm-bindgen Developers"]
 readme = "./README.md"
 categories = ["wasm"]
@@ -20,9 +20,9 @@ test = false
 doctest = false
 
 [dependencies]
-wasm-bindgen = { path = "../..", version = "0.2.90" }
+wasm-bindgen = { path = "../..", version = "0.2.91" }
 
 [target.'cfg(target_arch = "wasm32")'.dev-dependencies]
-wasm-bindgen-test = { path = '../test', version = '=0.3.40' }
-wasm-bindgen-futures = { path = '../futures', version = '0.4.40' }
-web-sys = { path = "../web-sys", version = "0.3.67", features = ["Headers", "Response", "ResponseInit"] }
+wasm-bindgen-test = { path = '../test', version = '=0.3.41' }
+wasm-bindgen-futures = { path = '../futures', version = '0.4.41' }
+web-sys = { path = "../web-sys", version = "0.3.68", features = ["Headers", "Response", "ResponseInit"] }
diff --git a/crates/macro-support/Cargo.toml b/crates/macro-support/Cargo.toml
index 1ba1c871..6a13463b 100644
--- a/crates/macro-support/Cargo.toml
+++ b/crates/macro-support/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-macro-support"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen Developers"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/macro-support"
@@ -21,5 +21,5 @@ strict-macro = []
 syn = { version = '2.0', features = ['visit', 'full'] }
 quote = '1.0'
 proc-macro2 = "1.0"
-wasm-bindgen-backend = { path = "../backend", version = "=0.2.90" }
-wasm-bindgen-shared = { path = "../shared", version = "=0.2.90" }
+wasm-bindgen-backend = { path = "../backend", version = "=0.2.91" }
+wasm-bindgen-shared = { path = "../shared", version = "=0.2.91" }
diff --git a/crates/macro/Cargo.toml b/crates/macro/Cargo.toml
index ae7a3044..46ceac29 100644
--- a/crates/macro/Cargo.toml
+++ b/crates/macro/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-macro"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen Developers"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/macro"
@@ -21,11 +21,11 @@ xxx_debug_only_print_generated_code = []
 strict-macro = ["wasm-bindgen-macro-support/strict-macro"]
 
 [dependencies]
-wasm-bindgen-macro-support = { path = "../macro-support", version = "=0.2.90" }
+wasm-bindgen-macro-support = { path = "../macro-support", version = "=0.2.91" }
 quote = "1.0"
 
 [dev-dependencies]
 trybuild = "1.0"
-wasm-bindgen = { path = "../..", version = "0.2.90" }
-wasm-bindgen-futures = { path = "../futures", version = "0.4.40" }
-web-sys = { path = "../web-sys", version = "0.3.67", features = ["Worker"] }
+wasm-bindgen = { path = "../..", version = "0.2.91" }
+wasm-bindgen-futures = { path = "../futures", version = "0.4.41" }
+web-sys = { path = "../web-sys", version = "0.3.68", features = ["Worker"] }
diff --git a/crates/multi-value-xform/Cargo.toml b/crates/multi-value-xform/Cargo.toml
index a03bf6f5..dd6a7a0e 100644
--- a/crates/multi-value-xform/Cargo.toml
+++ b/crates/multi-value-xform/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-multi-value-xform"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen Developers"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/multi-value-xform"
diff --git a/crates/shared/Cargo.toml b/crates/shared/Cargo.toml
index eb2ab22c..a5d90fcd 100644
--- a/crates/shared/Cargo.toml
+++ b/crates/shared/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-shared"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen Developers"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/shared"
diff --git a/crates/threads-xform/Cargo.toml b/crates/threads-xform/Cargo.toml
index 220e8022..e55df83b 100644
--- a/crates/threads-xform/Cargo.toml
+++ b/crates/threads-xform/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-threads-xform"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen Developers"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/threads-xform"
@@ -15,7 +15,7 @@ rust-version = "1.57"
 [dependencies]
 anyhow = "1.0"
 walrus = "0.20.2"
-wasm-bindgen-wasm-conventions = { path = "../wasm-conventions", version = "=0.2.90" }
+wasm-bindgen-wasm-conventions = { path = "../wasm-conventions", version = "=0.2.91" }
 
 [dev-dependencies]
 rayon = "1.0"
diff --git a/crates/wasm-conventions/Cargo.toml b/crates/wasm-conventions/Cargo.toml
index 234d499f..aee55476 100644
--- a/crates/wasm-conventions/Cargo.toml
+++ b/crates/wasm-conventions/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-wasm-conventions"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen developers"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/wasm-conventions"
diff --git a/crates/wasm-interpreter/Cargo.toml b/crates/wasm-interpreter/Cargo.toml
index 94d33d3b..5f53464d 100644
--- a/crates/wasm-interpreter/Cargo.toml
+++ b/crates/wasm-interpreter/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-wasm-interpreter"
-version = "0.2.90"
+version = "0.2.91"
 authors = ["The wasm-bindgen Developers"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rustwasm/wasm-bindgen/tree/main/crates/wasm-interpreter"
@@ -16,7 +16,7 @@ rust-version = "1.57"
 anyhow = "1.0"
 log = "0.4"
 walrus = "0.20.2"
-wasm-bindgen-wasm-conventions = { path = "../wasm-conventions", version = "0.2.90" }
+wasm-bindgen-wasm-conventions = { path = "../wasm-conventions", version = "0.2.91" }
 
 [dev-dependencies]
 tempfile = "3"
diff --git a/crates/web-sys/Cargo.toml b/crates/web-sys/Cargo.toml
index 55dfc9fc..11f287f5 100644
--- a/crates/web-sys/Cargo.toml
+++ b/crates/web-sys/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "web-sys"
-version = "0.3.67"
+version = "0.3.68"
 authors = ["The wasm-bindgen Developers"]
 readme = "./README.md"
 homepage = "https://rustwasm.github.io/wasm-bindgen/web-sys/index.html"
@@ -22,12 +22,12 @@ doctest = false
 test = false
 
 [dependencies]
-wasm-bindgen = { path = "../..", version = "0.2.90" }
-js-sys = { path = '../js-sys', version = '0.3.67' }
+wasm-bindgen = { path = "../..", version = "0.2.91" }
+js-sys = { path = '../js-sys', version = '0.3.68' }
 
 [target.'cfg(target_arch = "wasm32")'.dev-dependencies]
-wasm-bindgen-test = { path = '../test', version = '0.3.40' }
-wasm-bindgen-futures = { path = '../futures', version = '0.4.40' }
+wasm-bindgen-test = { path = '../test', version = '0.3.41' }
+wasm-bindgen-futures = { path = '../futures', version = '0.4.41' }
 
 # This list is auto-generated by the wasm-bindgen-webidl program
 [features]
diff --git a/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs b/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs
index a872f8a3..4bafe390 100644
--- a/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs
+++ b/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs
@@ -128,6 +128,27 @@ impl RtcRtpEncodingParameters {
         let _ = r;
         self
     }
+    #[cfg(web_sys_unstable_apis)]
+    #[doc = "Change the `scalabilityMode` field of this object."]
+    #[doc = ""]
+    #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"]
+    #[doc = ""]
+    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
+    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
+    pub fn scalability_mode(&mut self, val: &str) -> &mut Self {
+        use wasm_bindgen::JsValue;
+        let r = ::js_sys::Reflect::set(
+            self.as_ref(),
+            &JsValue::from("scalabilityMode"),
+            &JsValue::from(val),
+        );
+        debug_assert!(
+            r.is_ok(),
+            "setting properties should never fail on our dictionary objects"
+        );
+        let _ = r;
+        self
+    }
     #[doc = "Change the `scaleResolutionDownBy` field of this object."]
     #[doc = ""]
     #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"]
diff --git a/crates/web-sys/src/features/gen_RtcRtpTransceiver.rs b/crates/web-sys/src/features/gen_RtcRtpTransceiver.rs
index 98be3953..8b8fca69 100644
--- a/crates/web-sys/src/features/gen_RtcRtpTransceiver.rs
+++ b/crates/web-sys/src/features/gen_RtcRtpTransceiver.rs
@@ -73,6 +73,13 @@ extern "C" {
     #[doc = ""]
     #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`*"]
     pub fn get_remote_track_id(this: &RtcRtpTransceiver) -> String;
+    # [wasm_bindgen (method , structural , js_class = "RTCRtpTransceiver" , js_name = setCodecPreferences)]
+    #[doc = "The `setCodecPreferences()` method."]
+    #[doc = ""]
+    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/setCodecPreferences)"]
+    #[doc = ""]
+    #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`*"]
+    pub fn set_codec_preferences(this: &RtcRtpTransceiver, codecs: &::wasm_bindgen::JsValue);
     # [wasm_bindgen (method , structural , js_class = "RTCRtpTransceiver" , js_name = stop)]
     #[doc = "The `stop()` method."]
     #[doc = ""]
diff --git a/crates/web-sys/webidls/enabled/RTCRtpTransceiver.webidl b/crates/web-sys/webidls/enabled/RTCRtpTransceiver.webidl
index fb8d594d..4c89a032 100644
--- a/crates/web-sys/webidls/enabled/RTCRtpTransceiver.webidl
+++ b/crates/web-sys/webidls/enabled/RTCRtpTransceiver.webidl
@@ -33,8 +33,7 @@ interface RTCRtpTransceiver {
     readonly attribute RTCRtpTransceiverDirection? currentDirection;
 
     undefined stop();
-    // TODO: bug 1396922
-    // undefined setCodecPreferences(sequence<RTCRtpCodecCapability> codecs);
+    undefined setCodecPreferences(sequence<RTCRtpCodecCapability> codecs);
 
     [ChromeOnly]
     undefined setRemoteTrackId(DOMString trackId);
diff --git a/crates/web-sys/webidls/unstable/RTCRtpSender.webidl b/crates/web-sys/webidls/unstable/RTCRtpSender.webidl
new file mode 100644
index 00000000..b1b5eb39
--- /dev/null
+++ b/crates/web-sys/webidls/unstable/RTCRtpSender.webidl
@@ -0,0 +1,3 @@
+partial dictionary RTCRtpEncodingParameters {
+    DOMString scalabilityMode;
+};
diff --git a/crates/webidl/Cargo.toml b/crates/webidl/Cargo.toml
index b5183178..d004298a 100644
--- a/crates/webidl/Cargo.toml
+++ b/crates/webidl/Cargo.toml
@@ -21,7 +21,7 @@ log = "0.4.1"
 proc-macro2 = "1.0"
 quote = '1.0'
 syn = { version = '2.0', features = ['full'] }
-wasm-bindgen-backend = { version = "=0.2.90", path = "../backend" }
+wasm-bindgen-backend = { version = "=0.2.91", path = "../backend" }
 weedle = { git = "https://github.com/rustwasm/weedle.git" }
 once_cell = "1.12"
 sourcefile = "0.1"
diff --git a/examples/add/Cargo.toml b/examples/add/Cargo.toml
index 41b63590..cdeabc31 100644
--- a/examples/add/Cargo.toml
+++ b/examples/add/Cargo.toml
@@ -9,4 +9,4 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
diff --git a/examples/canvas/Cargo.toml b/examples/canvas/Cargo.toml
index e1afecc8..d0088cc3 100644
--- a/examples/canvas/Cargo.toml
+++ b/examples/canvas/Cargo.toml
@@ -9,8 +9,8 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-js-sys = "0.3.67"
-wasm-bindgen = "0.2.90"
+js-sys = "0.3.68"
+wasm-bindgen = "0.2.91"
 
 [dependencies.web-sys]
 version = "0.3.4"
diff --git a/examples/char/Cargo.toml b/examples/char/Cargo.toml
index 6f61f63f..c8489529 100644
--- a/examples/char/Cargo.toml
+++ b/examples/char/Cargo.toml
@@ -9,4 +9,4 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
diff --git a/examples/closures/Cargo.toml b/examples/closures/Cargo.toml
index 6e37abd8..1021f1a3 100644
--- a/examples/closures/Cargo.toml
+++ b/examples/closures/Cargo.toml
@@ -9,8 +9,8 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
-js-sys = "0.3.67"
+wasm-bindgen = "0.2.91"
+js-sys = "0.3.68"
 
 [dependencies.web-sys]
 version = "0.3.4"
diff --git a/examples/console_log/Cargo.toml b/examples/console_log/Cargo.toml
index c1ee13c3..64f59399 100644
--- a/examples/console_log/Cargo.toml
+++ b/examples/console_log/Cargo.toml
@@ -9,5 +9,5 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
-web-sys = { version = "0.3.67", features = ['console'] }
+wasm-bindgen = "0.2.91"
+web-sys = { version = "0.3.68", features = ['console'] }
diff --git a/examples/deno/Cargo.toml b/examples/deno/Cargo.toml
index 37c91692..d2a17d0d 100644
--- a/examples/deno/Cargo.toml
+++ b/examples/deno/Cargo.toml
@@ -9,4 +9,4 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
diff --git a/examples/dom/Cargo.toml b/examples/dom/Cargo.toml
index f559e374..4556a2c7 100644
--- a/examples/dom/Cargo.toml
+++ b/examples/dom/Cargo.toml
@@ -9,7 +9,7 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
 
 [dependencies.web-sys]
 version = "0.3.4"
diff --git a/examples/duck-typed-interfaces/Cargo.toml b/examples/duck-typed-interfaces/Cargo.toml
index 9d58b57d..c5f6b1d6 100644
--- a/examples/duck-typed-interfaces/Cargo.toml
+++ b/examples/duck-typed-interfaces/Cargo.toml
@@ -9,4 +9,4 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
diff --git a/examples/fetch/Cargo.toml b/examples/fetch/Cargo.toml
index f7ff31cf..0f6e7468 100644
--- a/examples/fetch/Cargo.toml
+++ b/examples/fetch/Cargo.toml
@@ -9,9 +9,9 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
-js-sys = "0.3.67"
-wasm-bindgen-futures = "0.4.40"
+wasm-bindgen = "0.2.91"
+js-sys = "0.3.68"
+wasm-bindgen-futures = "0.4.41"
 
 [dependencies.web-sys]
 version = "0.3.4"
diff --git a/examples/guide-supported-types-examples/Cargo.toml b/examples/guide-supported-types-examples/Cargo.toml
index 1a065849..c6126275 100644
--- a/examples/guide-supported-types-examples/Cargo.toml
+++ b/examples/guide-supported-types-examples/Cargo.toml
@@ -9,5 +9,5 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
-js-sys = "0.3.67"
+wasm-bindgen = "0.2.91"
+js-sys = "0.3.68"
diff --git a/examples/hello_world/Cargo.toml b/examples/hello_world/Cargo.toml
index 64d83ba5..5ea4ba06 100644
--- a/examples/hello_world/Cargo.toml
+++ b/examples/hello_world/Cargo.toml
@@ -9,4 +9,4 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
diff --git a/examples/import_js/crate/Cargo.toml b/examples/import_js/crate/Cargo.toml
index 599ac181..cd87a9b8 100644
--- a/examples/import_js/crate/Cargo.toml
+++ b/examples/import_js/crate/Cargo.toml
@@ -8,4 +8,4 @@ edition = "2018"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
diff --git a/examples/julia_set/Cargo.toml b/examples/julia_set/Cargo.toml
index 9a54e10e..e16590c3 100644
--- a/examples/julia_set/Cargo.toml
+++ b/examples/julia_set/Cargo.toml
@@ -9,7 +9,7 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
 
 [dependencies.web-sys]
 version = "0.3.4"
diff --git a/examples/paint/Cargo.toml b/examples/paint/Cargo.toml
index 1786bdaf..e4a108d5 100644
--- a/examples/paint/Cargo.toml
+++ b/examples/paint/Cargo.toml
@@ -9,8 +9,8 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-js-sys = "0.3.67"
-wasm-bindgen = "0.2.90"
+js-sys = "0.3.68"
+wasm-bindgen = "0.2.91"
 
 [dependencies.web-sys]
 version = "0.3.4"
diff --git a/examples/performance/Cargo.toml b/examples/performance/Cargo.toml
index 38c62cd0..46aa55a1 100644
--- a/examples/performance/Cargo.toml
+++ b/examples/performance/Cargo.toml
@@ -9,7 +9,7 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
 humantime = "2"
 
 [dependencies.web-sys]
diff --git a/examples/raytrace-parallel/Cargo.toml b/examples/raytrace-parallel/Cargo.toml
index 2b8ff0b8..ebdf77b6 100644
--- a/examples/raytrace-parallel/Cargo.toml
+++ b/examples/raytrace-parallel/Cargo.toml
@@ -10,14 +10,14 @@ crate-type = ["cdylib"]
 
 [dependencies]
 console_error_panic_hook = "0.1"
-js-sys = "0.3.67"
+js-sys = "0.3.68"
 rayon = "1.1.0"
 rayon-core = "1.5.0"
 raytracer = { git = 'https://github.com/alexcrichton/raytracer', branch = 'update-deps' }
 serde-wasm-bindgen = "0.4.3"
 futures-channel-preview = "0.3.0-alpha.18"
-wasm-bindgen = "0.2.90"
-wasm-bindgen-futures = "0.4.40"
+wasm-bindgen = "0.2.91"
+wasm-bindgen-futures = "0.4.41"
 
 [dependencies.web-sys]
 version = "0.3.23"
diff --git a/examples/request-animation-frame/Cargo.toml b/examples/request-animation-frame/Cargo.toml
index f0455d24..69a7ace5 100644
--- a/examples/request-animation-frame/Cargo.toml
+++ b/examples/request-animation-frame/Cargo.toml
@@ -9,7 +9,7 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
 
 [dependencies.web-sys]
 version = "0.3.4"
diff --git a/examples/synchronous-instantiation/Cargo.toml b/examples/synchronous-instantiation/Cargo.toml
index db5a4a73..bdf4115e 100644
--- a/examples/synchronous-instantiation/Cargo.toml
+++ b/examples/synchronous-instantiation/Cargo.toml
@@ -9,4 +9,4 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
diff --git a/examples/todomvc/Cargo.toml b/examples/todomvc/Cargo.toml
index ce7a6bd3..e8966679 100644
--- a/examples/todomvc/Cargo.toml
+++ b/examples/todomvc/Cargo.toml
@@ -12,8 +12,8 @@ crate-type = ["cdylib"]
 askama = "0.10.0"
 
 [dependencies]
-js-sys = "0.3.67"
-wasm-bindgen = "0.2.90"
+js-sys = "0.3.68"
+wasm-bindgen = "0.2.91"
 askama = "0.10.0"
 console_error_panic_hook = "0.1.5"
 
diff --git a/examples/wasm-audio-worklet/Cargo.toml b/examples/wasm-audio-worklet/Cargo.toml
index d9575a9d..1bcbe841 100644
--- a/examples/wasm-audio-worklet/Cargo.toml
+++ b/examples/wasm-audio-worklet/Cargo.toml
@@ -9,9 +9,9 @@ crate-type = ["cdylib"]
 
 [dependencies]
 console_log = "0.2.0"
-js-sys = "0.3.67"
-wasm-bindgen = "0.2.90"
-wasm-bindgen-futures = "0.4.40"
+js-sys = "0.3.68"
+wasm-bindgen = "0.2.91"
+wasm-bindgen-futures = "0.4.41"
 
 [dependencies.web-sys]
 version = "0.3.59"
diff --git a/examples/wasm-in-wasm-imports/Cargo.toml b/examples/wasm-in-wasm-imports/Cargo.toml
index efdab879..5431abe2 100644
--- a/examples/wasm-in-wasm-imports/Cargo.toml
+++ b/examples/wasm-in-wasm-imports/Cargo.toml
@@ -9,6 +9,6 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
-js-sys = "0.3.67"
-wasm-bindgen-futures = "0.4.40"
+wasm-bindgen = "0.2.91"
+js-sys = "0.3.68"
+wasm-bindgen-futures = "0.4.41"
diff --git a/examples/wasm-in-wasm/Cargo.toml b/examples/wasm-in-wasm/Cargo.toml
index 13a307d5..b2a8e483 100644
--- a/examples/wasm-in-wasm/Cargo.toml
+++ b/examples/wasm-in-wasm/Cargo.toml
@@ -9,6 +9,6 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
-js-sys = "0.3.67"
-wasm-bindgen-futures = "0.4.40"
+wasm-bindgen = "0.2.91"
+js-sys = "0.3.68"
+wasm-bindgen-futures = "0.4.41"
diff --git a/examples/wasm-in-web-worker/Cargo.toml b/examples/wasm-in-web-worker/Cargo.toml
index 25769363..8314c662 100644
--- a/examples/wasm-in-web-worker/Cargo.toml
+++ b/examples/wasm-in-web-worker/Cargo.toml
@@ -9,7 +9,7 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
 console_error_panic_hook = { version = "0.1.6", optional = true }
 
 [dependencies.web-sys]
diff --git a/examples/wasm2js/Cargo.toml b/examples/wasm2js/Cargo.toml
index 29e8eef3..d36f812d 100644
--- a/examples/wasm2js/Cargo.toml
+++ b/examples/wasm2js/Cargo.toml
@@ -9,4 +9,4 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
diff --git a/examples/weather_report/Cargo.toml b/examples/weather_report/Cargo.toml
index 1e76e800..628c24be 100644
--- a/examples/weather_report/Cargo.toml
+++ b/examples/weather_report/Cargo.toml
@@ -16,7 +16,7 @@ chrono = "0.4.11"
 reqwest = "0.10.6"
 wasm-bindgen-futures = "0.4.1"
 json= "*"
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
 gloo = "0.2.1"
 
 [dependencies.web-sys]
diff --git a/examples/webaudio/Cargo.toml b/examples/webaudio/Cargo.toml
index 03b440dc..a4968185 100644
--- a/examples/webaudio/Cargo.toml
+++ b/examples/webaudio/Cargo.toml
@@ -9,7 +9,7 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
 
 [dependencies.web-sys]
 version = "0.3.4"
diff --git a/examples/webgl/Cargo.toml b/examples/webgl/Cargo.toml
index bab7b4cf..c1452b37 100644
--- a/examples/webgl/Cargo.toml
+++ b/examples/webgl/Cargo.toml
@@ -9,8 +9,8 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-js-sys = "0.3.67"
-wasm-bindgen = "0.2.90"
+js-sys = "0.3.68"
+wasm-bindgen = "0.2.91"
 
 [dependencies.web-sys]
 version = "0.3.4"
diff --git a/examples/webrtc_datachannel/Cargo.toml b/examples/webrtc_datachannel/Cargo.toml
index 7f7fbca4..32fcd5dd 100644
--- a/examples/webrtc_datachannel/Cargo.toml
+++ b/examples/webrtc_datachannel/Cargo.toml
@@ -9,9 +9,9 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
 js-sys = "0.3"
-wasm-bindgen-futures = "0.4.40"
+wasm-bindgen-futures = "0.4.41"
 
 [dependencies.web-sys]
 version = "0.3.22"
diff --git a/examples/websockets/Cargo.toml b/examples/websockets/Cargo.toml
index 0cfd4214..97f537d4 100644
--- a/examples/websockets/Cargo.toml
+++ b/examples/websockets/Cargo.toml
@@ -9,7 +9,7 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
 js-sys = "0.3"
 
 [dependencies.web-sys]
diff --git a/examples/webxr/Cargo.toml b/examples/webxr/Cargo.toml
index c934e4c8..1ed18c40 100644
--- a/examples/webxr/Cargo.toml
+++ b/examples/webxr/Cargo.toml
@@ -10,9 +10,9 @@ crate-type = ["cdylib"]
 
 [dependencies]
 futures = "0.3.4"
-js-sys = "0.3.67"
-wasm-bindgen = "0.2.90"
-wasm-bindgen-futures = "0.4.40"
+js-sys = "0.3.68"
+wasm-bindgen = "0.2.91"
+wasm-bindgen-futures = "0.4.41"
 
 [dependencies.web-sys]
 version = "0.3.37"
diff --git a/examples/without-a-bundler/Cargo.toml b/examples/without-a-bundler/Cargo.toml
index 3d7a30ba..b55ed461 100644
--- a/examples/without-a-bundler/Cargo.toml
+++ b/examples/without-a-bundler/Cargo.toml
@@ -9,7 +9,7 @@ rust-version = "1.57"
 crate-type = ["cdylib"]
 
 [dependencies]
-wasm-bindgen = "0.2.90"
+wasm-bindgen = "0.2.91"
 
 [dependencies.web-sys]
 version = "0.3.4"


Test patch:
diff --git a/crates/test-macro/Cargo.toml b/crates/test-macro/Cargo.toml
index 0acca18e..4dccf097 100644
--- a/crates/test-macro/Cargo.toml
+++ b/crates/test-macro/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-test-macro"
-version = "0.3.40"
+version = "0.3.41"
 authors = ["The wasm-bindgen Developers"]
 description = "Internal testing macro for wasm-bindgen"
 license = "MIT OR Apache-2.0"
diff --git a/crates/test/Cargo.toml b/crates/test/Cargo.toml
index 51c1a59c..d7f5dc07 100644
--- a/crates/test/Cargo.toml
+++ b/crates/test/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "wasm-bindgen-test"
-version = "0.3.40"
+version = "0.3.41"
 authors = ["The wasm-bindgen Developers"]
 description = "Internal testing crate for wasm-bindgen"
 license = "MIT OR Apache-2.0"
@@ -10,11 +10,11 @@ rust-version = "1.57"
 
 [dependencies]
 console_error_panic_hook = '0.1'
-js-sys = { path = '../js-sys', version = '0.3.67' }
+js-sys = { path = '../js-sys', version = '0.3.68' }
 scoped-tls = "1.0"
-wasm-bindgen = { path = '../..', version = '0.2.90' }
-wasm-bindgen-futures = { path = '../futures', version = '0.4.40' }
-wasm-bindgen-test-macro = { path = '../test-macro', version = '=0.3.40' }
+wasm-bindgen = { path = '../..', version = '0.2.91' }
+wasm-bindgen-futures = { path = '../futures', version = '0.4.41' }
+wasm-bindgen-test-macro = { path = '../test-macro', version = '=0.3.41' }
 gg-alloc = { version = "1.0", optional = true }
 
 [lib]