wasm-bindgen/tests
Alex Crichton 0b08bba0c7 Use static accessors if possible to get global object
Previously we always used `Function('return this')` but this triggers
CSP errors since it's basically `eval`. Instead this adds a few
preflight checks to look for objects like `globalThis`, `self`, etc.
Currently we don't have a `#[wasm_bindgen]` function annotation to
import a bare global field like `self`, but we test accesses with
`self.self` and `globalThis.globalThis`, catching errors to handle any
issues.

Closes #1641
2019-07-08 13:28:06 -07:00
..
crates cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
headless Run fmt and clippy 2019-05-28 09:52:44 -05:00
no-std cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
wasm Use static accessors if possible to get global object 2019-07-08 13:28:06 -07:00
non_wasm.rs cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
std-crate-no-std-dep.rs cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
unwrap_throw.rs Add the UnwrapThrowExt<T> trait 2019-01-31 13:26:21 -08:00