summaryrefslogtreecommitdiff
path: root/op_crates/url/00_url.js
diff options
context:
space:
mode:
Diffstat (limited to 'op_crates/url/00_url.js')
-rw-r--r--op_crates/url/00_url.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/op_crates/url/00_url.js b/op_crates/url/00_url.js
index 7c24a871a..f51b4aedc 100644
--- a/op_crates/url/00_url.js
+++ b/op_crates/url/00_url.js
@@ -391,8 +391,19 @@
}
}
+ /**
+ * This function implements application/x-www-form-urlencoded parsing.
+ * https://url.spec.whatwg.org/#concept-urlencoded-parser
+ * @param {Uint8Array} bytes
+ * @returns {[string, string][]}
+ */
+ function parseUrlEncoded(bytes) {
+ return core.opSync("op_url_parse_search_params", null, bytes);
+ }
+
window.__bootstrap.url = {
URL,
URLSearchParams,
+ parseUrlEncoded,
};
})(this);