diff options
Diffstat (limited to 'op_crates/webidl/lib.rs')
-rw-r--r-- | op_crates/webidl/lib.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/op_crates/webidl/lib.rs b/op_crates/webidl/lib.rs index 7e617c7a7..a1a404dbd 100644 --- a/op_crates/webidl/lib.rs +++ b/op_crates/webidl/lib.rs @@ -1,14 +1,11 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -use deno_core::JsRuntime; +use deno_core::Extension; /// Load and execute the javascript code. -pub fn init(isolate: &mut JsRuntime) { - let files = vec![( +pub fn init() -> Extension { + Extension::pure_js(vec![( "deno:op_crates/webidl/00_webidl.js", include_str!("00_webidl.js"), - )]; - for (url, source_code) in files { - isolate.execute(url, source_code).unwrap(); - } + )]) } |