Repository: rustwasm/wasm-bindgen
Pull request #3826 (2024-02-05 09:31:29)

readme: also link the guide built from the main branch
I was confused by the two copies of the Guide on the website, and I hope this will prevent similar confusion for others.  I haven't actually tracked down how these are deployed, so please correct me if I have misunderstood the versions.  The changes from [this commit touching the Guide](https://github.com/rustwasm/wasm-bindgen/commit/fb518d3b190ca8885dbac5e149ce1bbef3d8a92b) are present [here](https://rustwasm.github.io/wasm-bindgen/reference/passing-rust-closures-to-js.html) but not [here](https://rustwasm.github.io/docs/wasm-bindgen/reference/passing-rust-closures-to-js.html).

The [pre-release version of the wasm-pack book](https://rustwasm.github.io/wasm-pack/book/) also has a banner at the top linking to the release version.  LMK if you want similar for this Guide, I will try to figure out how.

daxpedda: There is an issue currently with deploying the release version, the one currently up is completely outdated.
I would prefer not to link it at all until it is actually fixed.

Patch:
diff --git a/.github/actions/setup-geckodriver/action.yml b/.github/actions/setup-geckodriver/action.yml
index 40611a1d..89dd42ca 100644
--- a/.github/actions/setup-geckodriver/action.yml
+++ b/.github/actions/setup-geckodriver/action.yml
@@ -2,5 +2,5 @@ name: 'Setup Geckodriver'
 description: 'Setup Geckodriver'
 
 runs:
-  using: node16
+  using: node20
   main: 'main.js'
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 233af6fb..d5e26e66 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -24,7 +24,7 @@ jobs:
     name: Rustfmt
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup component add rustfmt
     - run: cargo fmt --all -- --check
@@ -34,7 +34,7 @@ jobs:
     name: Check
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: cargo check --all
 
@@ -43,7 +43,7 @@ jobs:
     name: Clippy
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add wasm32-unknown-unknown
     - run: cargo clippy --no-deps --all-features -p wasm-bindgen-backend -- -D warnings
@@ -77,10 +77,10 @@ jobs:
     env:
       WASM_BINDGEN_SPLIT_LINKED_MODULES: 1
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add wasm32-unknown-unknown
-    - uses: actions/setup-node@v3
+    - uses: actions/setup-node@v4
       with:
         node-version: '20'
     - uses: ./.github/actions/setup-geckodriver
@@ -102,8 +102,8 @@ jobs:
     name: "Run wasm-bindgen crate tests with multithreading enabled"
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
-    - run: rustup default nightly-2023-05-08
+    - uses: actions/checkout@v4
+    - run: rustup default nightly-2024-02-06
     - run: rustup target add wasm32-unknown-unknown
     - run: rustup component add rust-src
     # Note: we only run the browser tests here, because wasm-bindgen doesn't support threading in Node yet.
@@ -117,10 +117,10 @@ jobs:
   #   name: "Run wasm-bindgen crate tests (Windows)"
   #   runs-on: windows-latest
   #   steps:
-  #   - uses: actions/checkout@v3
+  #   - uses: actions/checkout@v4
   #   - run: rustup update --no-self-update stable && rustup default stable
   #   - run: rustup target add wasm32-unknown-unknown
-  #   - uses: actions/setup-node@v3
+  #   - uses: actions/setup-node@v4
   #     with:
   #       node-version: '20'
   #   - uses: ./.github/actions/setup-geckodriver
@@ -138,10 +138,10 @@ jobs:
     name: Run native tests
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add wasm32-unknown-unknown
-    - uses: actions/setup-node@v3
+    - uses: actions/setup-node@v4
       with:
         node-version: '20'
     - run: cargo test
@@ -158,10 +158,10 @@ jobs:
     name: "Run web-sys crate tests"
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add wasm32-unknown-unknown
-    - uses: actions/setup-node@v3
+    - uses: actions/setup-node@v4
       with:
         node-version: '20'
     - uses: ./.github/actions/setup-geckodriver
@@ -178,7 +178,7 @@ jobs:
     name: "Verify that web-sys is compiled correctly"
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: cd crates/web-sys && cargo run --release --package wasm-bindgen-webidl -- webidls src/features ./Cargo.toml
     - run: git diff --exit-code
@@ -187,10 +187,10 @@ jobs:
     name: "Run js-sys crate tests"
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add wasm32-unknown-unknown
-    - uses: actions/setup-node@v3
+    - uses: actions/setup-node@v4
       with:
         node-version: '20'
     - uses: ./.github/actions/setup-geckodriver
@@ -203,10 +203,10 @@ jobs:
     name: "Run wasm-bindgen-webidl crate tests"
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add wasm32-unknown-unknown
-    - uses: actions/setup-node@v3
+    - uses: actions/setup-node@v4
       with:
         node-version: '20'
     - run: cargo test -p wasm-bindgen-webidl
@@ -221,10 +221,10 @@ jobs:
     name: "Test TypeScript output of wasm-bindgen"
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add wasm32-unknown-unknown
-    - uses: actions/setup-node@v3
+    - uses: actions/setup-node@v4
       with:
         node-version: '20'
     - run: cd crates/typescript-tests && ./run.sh
@@ -233,7 +233,7 @@ jobs:
     name: "Build and test the deno example"
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add wasm32-unknown-unknown
     - uses: denoland/setup-deno@v1
@@ -245,7 +245,7 @@ jobs:
     name: Run UI compile-fail tests
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update 1.69.0 && rustup default 1.69.0
     - run: cargo test -p wasm-bindgen-macro
     - run: cargo test -p wasm-bindgen-test-macro
@@ -253,7 +253,7 @@ jobs:
   build_examples:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add wasm32-unknown-unknown
     - run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f
@@ -274,7 +274,7 @@ jobs:
         done
       env:
         RUSTFLAGS: --cfg=web_sys_unstable_apis
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: examples1
         path: exbuild
@@ -282,8 +282,8 @@ jobs:
   build_nightly:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
-    - run: rustup default nightly-2023-05-08
+    - uses: actions/checkout@v4
+    - run: rustup default nightly-2024-02-06
     - run: rustup target add wasm32-unknown-unknown
     - run: rustup component add rust-src
     - run: |
@@ -292,7 +292,7 @@ jobs:
             ./build.sh && mkdir -p ../../exbuild/$dir && cp -r ./* ../../exbuild/$dir
           ) || exit 1;
         done
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: examples2
         path: exbuild
@@ -303,12 +303,12 @@ jobs:
     - build_nightly
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
-    - uses: actions/download-artifact@v3
+    - uses: actions/checkout@v4
+    - uses: actions/download-artifact@v4
       with:
         name: examples1
         path: exbuild
-    - uses: actions/download-artifact@v3
+    - uses: actions/download-artifact@v4
       with:
         name: examples2
         path: exbuild
@@ -320,12 +320,12 @@ jobs:
   build_benchmarks:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add wasm32-unknown-unknown
     - run: cargo build --manifest-path benchmarks/Cargo.toml --release --target wasm32-unknown-unknown
     - run: cargo run -p wasm-bindgen-cli -- target/wasm32-unknown-unknown/release/wasm_bindgen_benchmark.wasm --out-dir benchmarks/pkg --target web
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: benchmarks
         path: benchmarks
@@ -333,7 +333,7 @@ jobs:
   dist_linux_x86_64_musl:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add x86_64-unknown-linux-musl
     - run: sudo apt update -y && sudo apt install musl-tools -y
@@ -342,7 +342,7 @@ jobs:
         strip -g target/x86_64-unknown-linux-musl/release/wasm-bindgen
         strip -g target/x86_64-unknown-linux-musl/release/wasm-bindgen-test-runner
         strip -g target/x86_64-unknown-linux-musl/release/wasm2es6js
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: dist_linux_x86_64_musl
         path: "target/x86_64-unknown-linux-musl/release/wasm*"
@@ -350,7 +350,7 @@ jobs:
   dist_linux_aarch64_gnu:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add aarch64-unknown-linux-gnu
     - run: sudo apt update -y && sudo apt install gcc-aarch64-linux-gnu -y
@@ -358,7 +358,7 @@ jobs:
         cargo build --manifest-path crates/cli/Cargo.toml --target aarch64-unknown-linux-gnu --features vendored-openssl --release
       env:
         CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: dist_linux_aarch64_gnu
         path: "target/aarch64-unknown-linux-gnu/release/wasm*"
@@ -366,12 +366,12 @@ jobs:
   dist_macos_x86_64:
     runs-on: macos-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: cargo build --manifest-path crates/cli/Cargo.toml --release
       env:
         MACOSX_DEPLOYMENT_TARGET: 10.7
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: dist_macos_x86_64
         path: "target/release/wasm*"
@@ -379,14 +379,14 @@ jobs:
   dist_macos_aarch64:
     runs-on: macos-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: rustup target add aarch64-apple-darwin
     - run: |
         cargo build --manifest-path crates/cli/Cargo.toml --target aarch64-apple-darwin --release
       env:
         MACOSX_DEPLOYMENT_TARGET: 10.7
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: dist_macos_aarch64
         path: "target/aarch64-apple-darwin/release/wasm*"
@@ -394,12 +394,12 @@ jobs:
   dist_windows:
     runs-on: windows-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update stable && rustup default stable
     - run: cargo build --manifest-path crates/cli/Cargo.toml --release
       env:
         RUSTFLAGS: -Ctarget-feature=+crt-static
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: dist_windows
         path: "target/release/wasm*"
@@ -407,12 +407,12 @@ jobs:
   doc_book:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: |
         curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.28/mdbook-v0.4.28-x86_64-unknown-linux-gnu.tar.gz | tar xzf -
         echo $PWD >> $GITHUB_PATH
     - run: (cd guide && mdbook build)
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: doc_book
         path: guide/book/html
@@ -420,7 +420,7 @@ jobs:
   doc_api:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: rustup update --no-self-update nightly && rustup default nightly
     - run: cargo doc --no-deps --features 'serde-serialize'
     - run: cargo doc --no-deps --manifest-path crates/js-sys/Cargo.toml
@@ -429,7 +429,7 @@ jobs:
         RUSTDOCFLAGS: --cfg=web_sys_unstable_apis
     - run: cargo doc --no-deps --manifest-path crates/futures/Cargo.toml
     - run: tar czvf docs.tar.gz target/doc
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: doc_api
         path: docs.tar.gz
@@ -452,10 +452,10 @@ jobs:
       - build_benchmarks
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
       with:
         fetch-depth: 0
-    - uses: actions/download-artifact@v3
+    - uses: actions/download-artifact@v4
       with:
         path: artifacts
     - run: find artifacts
@@ -484,7 +484,7 @@ jobs:
         mk x86_64-apple-darwin dist_macos_x86_64
         mk aarch64-apple-darwin dist_macos_aarch64
         mk x86_64-pc-windows-msvc dist_windows
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: gh-release
         path: gh-release
@@ -496,7 +496,7 @@ jobs:
         mv artifacts/examples2/* gh-pages/exbuild
         mv artifacts/benchmarks gh-pages/benchmarks
         tar czf gh-pages.tar.gz gh-pages
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: gh-pages
         path: gh-pages.tar.gz
@@ -517,4 +517,4 @@ jobs:
     - run: ./publish publish
       if: startsWith(github.ref, 'refs/tags/')
       env:
-        CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
+        CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_PUBLISH_TOKEN }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a73f06b..1650b86e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,10 +5,24 @@
 
 ### Added
 
+* Add bindings for `RTCPeerConnectionIceErrorEvent`.
+  [#3835](https://github.com/rustwasm/wasm-bindgen/pull/3835)
+
+--------------------------------------------------------------------------------
+
+## [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`.
@@ -48,6 +62,11 @@
 * Fixed using `#[wasm_bindgen(js_name = default)]` with `#[wasm_bindgen(module = ...)]`.
   [#3823](https://github.com/rustwasm/wasm-bindgen/pull/3823)
 
+* Fixed nighly build of `wasm-bindgen-futures`.
+  [#3827](https://github.com/rustwasm/wasm-bindgen/pull/3827)
+
+--------------------------------------------------------------------------------
+
 ## [0.2.90](https://github.com/rustwasm/wasm-bindgen/compare/0.2.89...0.2.90)
 
 Released 2024-01-06
@@ -90,6 +109,8 @@ Released 2024-01-06
   `RtcLifecycleEvent` and `WebrtcGlobalStatisticsReport` features.
   [#3723](https://github.com/rustwasm/wasm-bindgen/pull/3723)
 
+--------------------------------------------------------------------------------
+
 ## [0.2.89](https://github.com/rustwasm/wasm-bindgen/compare/0.2.88...0.2.89)
 
 Released 2023-11-27.
@@ -118,6 +139,8 @@ Released 2023-11-27.
 * Removed Gecko-internal dictionary bindings `Csp`, `CspPolicies`, `CspReport` and `CspReportProperties`.
   [#3721](https://github.com/rustwasm/wasm-bindgen/pull/3721)
 
+--------------------------------------------------------------------------------
+
 ## [0.2.88](https://github.com/rustwasm/wasm-bindgen/compare/0.2.87...0.2.88)
 
 Released 2023-11-01
@@ -282,6 +305,8 @@ Released 2023-11-01
 * Removed `GetNotificationOptions`, `NotificationBehavior` and `Notification.get()` because
   they don't exist anymore.
 
+--------------------------------------------------------------------------------
+
 ## [0.2.87](https://github.com/rustwasm/wasm-bindgen/compare/0.2.86...0.2.87)
 
 Released 2023-06-12.
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/README.md b/README.md
index be034243..82a9da42 100644
--- a/README.md
+++ b/README.md
@@ -7,14 +7,14 @@
   </p>
 
   <p>
-    <a href="https://dev.azure.com/rustwasm/wasm-bindgen/_build/latest?definitionId=1&branchName=master"><img src="https://img.shields.io/azure-devops/build/rustwasm/wasm-bindgen/1.svg?style=flat-square" alt="Build Status" /></a>
+    <a href="https://github.com/rustwasm/wasm-bindgen/actions/workflows/main.yml?query=branch%3Amain"><img src="https://github.com/rustwasm/wasm-bindgen/actions/workflows/main.yml/badge.svg?branch=main" alt="Build Status" /></a>
     <a href="https://crates.io/crates/wasm-bindgen"><img src="https://img.shields.io/crates/v/wasm-bindgen.svg?style=flat-square" alt="Crates.io version" /></a>
     <a href="https://crates.io/crates/wasm-bindgen"><img src="https://img.shields.io/crates/d/wasm-bindgen.svg?style=flat-square" alt="Download" /></a>
     <a href="https://docs.rs/wasm-bindgen"><img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square" alt="docs.rs docs" /></a>
   </p>
 
   <h3>
-    <a href="https://rustwasm.github.io/docs/wasm-bindgen/">Guide</a>
+    <a href="https://rustwasm.github.io/wasm-bindgen/">Guide (main branch)</a>
     <span> | </span>
     <a href="https://docs.rs/wasm-bindgen">API Docs</a>
     <span> | </span>
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/futures/src/lib.rs b/crates/futures/src/lib.rs
index 8a02a51b..a44ec7c6 100644
--- a/crates/futures/src/lib.rs
+++ b/crates/futures/src/lib.rs
@@ -30,7 +30,7 @@
 //! systems and make sure that Rust/JavaScript can work together with
 //! asynchronous and I/O work.
 
-#![cfg_attr(target_feature = "atomics", feature(stdsimd))]
+#![cfg_attr(target_feature = "atomics", feature(stdarch_wasm_atomic_wait))]
 #![deny(missing_docs)]
 
 use js_sys::Promise;
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..66ce7b01 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]
@@ -1102,6 +1102,7 @@ RtcOfferAnswerOptions = []
 RtcOfferOptions = []
 RtcOutboundRtpStreamStats = []
 RtcPeerConnection = ["EventTarget"]
+RtcPeerConnectionIceErrorEvent = ["Event"]
 RtcPeerConnectionIceEvent = ["Event"]
 RtcPeerConnectionIceEventInit = []
 RtcPeerConnectionState = []
diff --git a/crates/web-sys/src/features/gen_RtcPeerConnectionIceErrorEvent.rs b/crates/web-sys/src/features/gen_RtcPeerConnectionIceErrorEvent.rs
new file mode 100644
index 00000000..fd0fc4a2
--- /dev/null
+++ b/crates/web-sys/src/features/gen_RtcPeerConnectionIceErrorEvent.rs
@@ -0,0 +1,50 @@
+#![allow(unused_imports)]
+#![allow(clippy::all)]
+use super::*;
+use wasm_bindgen::prelude::*;
+#[wasm_bindgen]
+extern "C" {
+    # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = RTCPeerConnectionIceErrorEvent , typescript_type = "RTCPeerConnectionIceErrorEvent")]
+    #[derive(Debug, Clone, PartialEq, Eq)]
+    #[doc = "The `RtcPeerConnectionIceErrorEvent` class."]
+    #[doc = ""]
+    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent)"]
+    #[doc = ""]
+    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
+    pub type RtcPeerConnectionIceErrorEvent;
+    # [wasm_bindgen (structural , method , getter , js_class = "RTCPeerConnectionIceErrorEvent" , js_name = address)]
+    #[doc = "Getter for the `address` field of this object."]
+    #[doc = ""]
+    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent/address)"]
+    #[doc = ""]
+    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
+    pub fn address(this: &RtcPeerConnectionIceErrorEvent) -> Option<String>;
+    # [wasm_bindgen (structural , method , getter , js_class = "RTCPeerConnectionIceErrorEvent" , js_name = port)]
+    #[doc = "Getter for the `port` field of this object."]
+    #[doc = ""]
+    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent/port)"]
+    #[doc = ""]
+    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
+    pub fn port(this: &RtcPeerConnectionIceErrorEvent) -> Option<u16>;
+    # [wasm_bindgen (structural , method , getter , js_class = "RTCPeerConnectionIceErrorEvent" , js_name = url)]
+    #[doc = "Getter for the `url` field of this object."]
+    #[doc = ""]
+    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent/url)"]
+    #[doc = ""]
+    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
+    pub fn url(this: &RtcPeerConnectionIceErrorEvent) -> String;
+    # [wasm_bindgen (structural , method , getter , js_class = "RTCPeerConnectionIceErrorEvent" , js_name = errorCode)]
+    #[doc = "Getter for the `errorCode` field of this object."]
+    #[doc = ""]
+    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent/errorCode)"]
+    #[doc = ""]
+    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
+    pub fn error_code(this: &RtcPeerConnectionIceErrorEvent) -> u16;
+    # [wasm_bindgen (structural , method , getter , js_class = "RTCPeerConnectionIceErrorEvent" , js_name = errorText)]
+    #[doc = "Getter for the `errorText` field of this object."]
+    #[doc = ""]
+    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent/errorText)"]
+    #[doc = ""]
+    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
+    pub fn error_text(this: &RtcPeerConnectionIceErrorEvent) -> String;
+}
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/src/features/mod.rs b/crates/web-sys/src/features/mod.rs
index c3bb7d92..9e5d5156 100644
--- a/crates/web-sys/src/features/mod.rs
+++ b/crates/web-sys/src/features/mod.rs
@@ -7495,6 +7495,13 @@ mod gen_RtcPeerConnection;
 #[allow(unused_imports)]
 pub use gen_RtcPeerConnection::*;
 
+#[cfg(feature = "RtcPeerConnectionIceErrorEvent")]
+#[allow(non_snake_case)]
+mod gen_RtcPeerConnectionIceErrorEvent;
+#[cfg(feature = "RtcPeerConnectionIceErrorEvent")]
+#[allow(unused_imports)]
+pub use gen_RtcPeerConnectionIceErrorEvent::*;
+
 #[cfg(feature = "RtcPeerConnectionIceEvent")]
 #[allow(non_snake_case)]
 mod gen_RtcPeerConnectionIceEvent;
diff --git a/crates/web-sys/webidls/enabled/RTCPeerConnectionIceErrorEvent.webidl b/crates/web-sys/webidls/enabled/RTCPeerConnectionIceErrorEvent.webidl
new file mode 100644
index 00000000..91e148ca
--- /dev/null
+++ b/crates/web-sys/webidls/enabled/RTCPeerConnectionIceErrorEvent.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnectioniceerrorevent
+ */
+
+[Exposed=Window]
+interface RTCPeerConnectionIceErrorEvent : Event {
+  constructor(DOMString type, RTCPeerConnectionIceErrorEventInit eventInitDict);
+  readonly attribute DOMString? address;
+  readonly attribute unsigned short? port;
+  readonly attribute DOMString url;
+  readonly attribute unsigned short errorCode;
+  readonly attribute USVString errorText;
+};
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]
diff --git a/crates/typescript-tests/jest.config.cjs b/crates/typescript-tests/jest.config.cjs
index c63e1456..2db7cd71 100644
--- a/crates/typescript-tests/jest.config.cjs
+++ b/crates/typescript-tests/jest.config.cjs
@@ -4,8 +4,21 @@ module.exports = {
   testEnvironment: 'node',
   extensionsToTreatAsEsm: [".ts"],
   verbose: true,
-  // TODO: match all test files
-  testMatch: ['**/src/simple_struct.ts', '**/src/typescript_type.ts'],
+  testMatch: ['**/src/*.ts'],
+  // TODO: migrate all test files and remove this
+  testPathIgnorePatterns: [
+    ".*/src/custom_section.ts$",
+    ".*/src/getters_setters.ts$",
+    ".*/src/inspectable.ts$",
+    ".*/src/memory.ts$",
+    ".*/src/omit_definition.ts$",
+    ".*/src/optional_fields.ts$",
+    ".*/src/opt_args_and_ret.ts$",
+    ".*/src/simple_async_fn.ts$",
+    ".*/src/simple_fn.ts$",
+    ".*/src/web_sys.ts$",
+    ".*/src/usize.ts$"
+  ],
   injectGlobals: false,
   globals: {
     'ts-jest':
diff --git a/crates/typescript-tests/src/enums.ts b/crates/typescript-tests/src/enums.ts
index ea246fc8..595586be 100644
--- a/crates/typescript-tests/src/enums.ts
+++ b/crates/typescript-tests/src/enums.ts
@@ -1,13 +1,28 @@
-import * as wbg from '../pkg/typescript_tests';
-
-const a1: wbg.Foo = wbg.Foo.A;
-const a2: wbg.Foo.A = wbg.Foo.A;
-const a3: wbg.Foo.A = 1;
-const b1: wbg.Foo = wbg.Foo.B;
-const b2: wbg.Foo.B = wbg.Foo.B;
-const b3: wbg.Foo.B = 3;
-
-const fn_expects_enum: (_: wbg.Foo) => void = wbg.fn_expects_enum;
-const fn_returns_enum: () => wbg.Foo = wbg.fn_returns_enum;
-const fn_expects_option_enum: (_?: wbg.Foo) => void = wbg.fn_expects_option_enum;
-const fn_returns_option_enum: () => wbg.Foo | undefined = wbg.fn_returns_option_enum;
+import * as wbg from "../pkg/typescript_tests";
+import { expect, jest, test } from "@jest/globals";
+
+test("construction", () => {
+  const a1: wbg.Foo = wbg.Foo.A;
+  const a2: wbg.Foo.A = wbg.Foo.A;
+  expect(a1).toStrictEqual(a2);
+  const a3: wbg.Foo.A = 1;
+  expect(a1).toStrictEqual(a3);
+
+  const b1: wbg.Foo = wbg.Foo.B;
+  const b2: wbg.Foo.B = wbg.Foo.B;
+  expect(b1).toStrictEqual(b2);
+  const b3: wbg.Foo.B = 3;
+  expect(b1).toStrictEqual(b3);
+  expect(a1).not.toStrictEqual(b1);
+});
+
+test("function calls", () => {
+  const fn_expects_enum: (_: wbg.Foo) => void = wbg.fn_expects_enum;
+  const fn_returns_enum: () => wbg.Foo = wbg.fn_returns_enum;
+  const fn_expects_option_enum: (_?: wbg.Foo) => void = wbg.fn_expects_option_enum;
+  const fn_returns_option_enum: () => wbg.Foo | undefined = wbg.fn_returns_option_enum;
+
+  fn_expects_enum(wbg.Foo.B);
+  expect(fn_returns_enum()).toStrictEqual(wbg.Foo.A);
+  expect(fn_returns_option_enum()).toStrictEqual(wbg.Foo.A);
+});