[oden-js] Track rejected promises, panic on unhandled rejections

This commit is contained in:
John Doty 2023-07-25 06:39:01 -07:00
parent 17c701a7d6
commit 22327a71b3
4 changed files with 108 additions and 14 deletions

View file

@ -56,7 +56,8 @@ pub struct ScriptContext {
impl ScriptContext {
pub fn new() -> Self {
let runtime = Runtime::with_loader(Loader::new());
let mut runtime = Runtime::new();
runtime.set_module_loader(Loader::new());
let mut context = Context::new(runtime);
context.add_intrinsic_bigfloat();