Skip to content

Commit ec6f289

Browse files
committed
Use globalThis to access Crypto
1 parent 055a7c2 commit ec6f289

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backends/wasm_js.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ extern "C" {
6969
// Web Crypto API: Crypto interface (https://www.w3.org/TR/WebCryptoAPI/)
7070
type Crypto;
7171
// Holds the global `Crypto` object.
72-
#[wasm_bindgen(thread_local_v2, js_name = crypto)]
72+
#[wasm_bindgen(thread_local_v2, js_namespace = globalThis, js_name = crypto)]
7373
static CRYPTO: Option<Crypto>;
7474
// Crypto.getRandomValues()
7575
#[cfg(not(target_feature = "atomics"))]

0 commit comments

Comments
 (0)