diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2021-03-02 01:30:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-02 02:30:24 +0100 |
commit | badc88b78a623d66ae86157d44a438c14dd7616a (patch) | |
tree | e06e4c6985c7721441e5857f72ec527f4100a816 /runtime | |
parent | 62f33e3b146da2f4264d6fa71409516de892bdf3 (diff) |
refactor(op_crates/web): Move URL parsing to Rust (#9276)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/web_worker.rs | 10 | ||||
-rw-r--r-- | runtime/worker.rs | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 7f258b3eb..30869ff41 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -231,10 +231,16 @@ impl WebWorker { ); ops::reg_json_sync(js_runtime, "op_close", deno_core::op_close); ops::reg_json_sync(js_runtime, "op_resources", deno_core::op_resources); + ops::reg_json_sync(js_runtime, "op_parse_url", deno_web::op_parse_url); ops::reg_json_sync( js_runtime, - "op_domain_to_ascii", - deno_web::op_domain_to_ascii, + "op_parse_url_search_params", + deno_web::op_parse_url_search_params, + ); + ops::reg_json_sync( + js_runtime, + "op_stringify_url_search_params", + deno_web::op_stringify_url_search_params, ); ops::io::init(js_runtime); ops::webgpu::init(js_runtime); diff --git a/runtime/worker.rs b/runtime/worker.rs index be6951f51..97466fadb 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -126,10 +126,16 @@ impl MainWorker { ops::crypto::init(js_runtime, options.seed); ops::reg_json_sync(js_runtime, "op_close", deno_core::op_close); ops::reg_json_sync(js_runtime, "op_resources", deno_core::op_resources); + ops::reg_json_sync(js_runtime, "op_parse_url", deno_web::op_parse_url); ops::reg_json_sync( js_runtime, - "op_domain_to_ascii", - deno_web::op_domain_to_ascii, + "op_parse_url_search_params", + deno_web::op_parse_url_search_params, + ); + ops::reg_json_sync( + js_runtime, + "op_stringify_url_search_params", + deno_web::op_stringify_url_search_params, ); ops::fs_events::init(js_runtime); ops::fs::init(js_runtime); |