char/avril

(wip) why'd you have to go and make things so complicaaaaated?

git clone https://git.t4t.associates/char/avril

Charlotte Somport URL extension to typescriptbf382b3

main
616 B17 linesraw
1import { ObjectDefineProperty, SymbolIterator } from "ext:core/primordials";
2import { installInterface } from "ext:web/interface.js";
3import { URL } from "./url.js";
4import { URLSearchParams } from "./search_params.js";
5for (const constructor of [URL, URLSearchParams]) {
6  installInterface(constructor.name, constructor);
7}
8for (const name of ["canParse", "parse"]) {
9  ObjectDefineProperty(URL, name, { enumerable: true });
10}
11ObjectDefineProperty(URLSearchParams.prototype, SymbolIterator, {
12  value: URLSearchParams.prototype.entries,
13  writable: true,
14  configurable: true,
15});
16
17export { URL, URLSearchParams };