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
..
2019-04-08 10:40:46 -07:00
2019-04-08 10:40:46 -07:00
2019-03-14 08:46:42 -03:00
2019-03-14 08:46:42 -03:00
2018-08-04 22:25:29 -05:00
2018-09-26 08:26:00 -07:00
2019-04-17 12:56:14 +01:00
2019-04-17 12:56:14 +01:00
2019-06-05 07:52:14 -07:00
2019-06-05 07:52:14 -07:00
2018-08-06 11:46:23 -07:00
2018-09-26 08:26:00 -07:00
2018-08-06 10:42:08 -07:00
2018-09-26 08:26:00 -07:00
2018-08-20 10:56:58 -07:00
2018-08-20 10:56:58 -07:00
2018-08-20 10:56:58 -07:00
2018-09-26 08:26:00 -07:00
2019-01-28 14:27:57 -08:00
2019-01-28 14:27:57 -08:00
2018-11-09 08:00:41 -08:00
2018-11-09 08:00:41 -08:00
2019-04-30 10:02:11 -07:00
2019-05-28 09:52:44 -05:00
2018-12-11 21:00:00 +02:00
2019-06-05 07:52:14 -07:00
2019-07-08 13:28:06 -07:00
2019-07-08 13:28:06 -07:00
2018-08-06 09:43:55 -07:00
2019-05-03 07:15:20 -07:00
2018-08-07 13:04:11 -07:00
2019-03-26 08:10:53 -07:00
2019-04-30 10:26:03 -03:00
2019-03-27 13:37:14 -07:00
2019-04-16 10:52:27 -07:00
2018-08-06 10:06:45 -07:00
2018-09-26 08:26:00 -07:00
2018-08-04 22:25:29 -05:00
2018-09-26 08:26:00 -07:00
2018-08-04 22:25:29 -05:00
2018-09-26 08:26:00 -07:00
2018-09-18 13:13:59 -07:00
2018-09-26 08:26:00 -07:00
2019-05-13 08:12:32 -07:00
2019-06-05 07:52:14 -07:00
2019-04-12 08:56:36 -07:00
2019-04-12 08:56:36 -07:00
2018-08-04 22:25:29 -05:00
2019-05-03 07:15:20 -07:00
2018-08-04 22:25:29 -05:00
2018-09-26 08:26:00 -07:00
2018-09-21 16:10:02 -07:00
2018-11-28 11:42:48 -08:00
2018-09-01 13:55:35 +01:00
2018-09-26 08:26:00 -07:00
2018-10-01 14:45:30 -07:00
2018-11-13 13:16:38 -08:00