import { ObjectDefineProperty, SymbolIterator } from "ext:core/primordials"; import { installInterface } from "ext:web/interface.js"; import { URL } from "./url.js"; import { URLSearchParams } from "./search_params.js"; for (const constructor of [URL, URLSearchParams]) { installInterface(constructor.name, constructor); } for (const name of ["canParse", "parse"]) { ObjectDefineProperty(URL, name, { enumerable: true }); } ObjectDefineProperty(URLSearchParams.prototype, SymbolIterator, { value: URLSearchParams.prototype.entries, writable: true, configurable: true, }); export { URL, URLSearchParams };