diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2023-11-19 17:13:38 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-19 09:13:38 +0100 |
commit | c806fbdabe144c865612bbbc9ef596c9611c8310 (patch) | |
tree | edb38d58720377580677ccbeffb693ffa1225cc4 /ext/web/12_location.js | |
parent | a7548afb58b9848e501a085455446f5de897ffaa (diff) |
fix(ext,runtime): add missing custom inspections (#21219)
Diffstat (limited to 'ext/web/12_location.js')
-rw-r--r-- | ext/web/12_location.js | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/ext/web/12_location.js b/ext/web/12_location.js index c612ca743..f469e9093 100644 --- a/ext/web/12_location.js +++ b/ext/web/12_location.js @@ -180,19 +180,20 @@ class Location { enumerable: true, }, [SymbolFor("Deno.privateCustomInspect")]: { - value: function (inspect) { - const object = { - hash: this.hash, - host: this.host, - hostname: this.hostname, - href: this.href, - origin: this.origin, - pathname: this.pathname, - port: this.port, - protocol: this.protocol, - search: this.search, - }; - return `${this.constructor.name} ${inspect(object)}`; + value: function (inspect, inspectOptions) { + return `${this.constructor.name} ${ + inspect({ + hash: this.hash, + host: this.host, + hostname: this.hostname, + href: this.href, + origin: this.origin, + pathname: this.pathname, + port: this.port, + protocol: this.protocol, + search: this.search, + }, inspectOptions) + }`; }, }, }); @@ -337,19 +338,20 @@ ObjectDefineProperties(WorkerLocation.prototype, { configurable: true, }, [SymbolFor("Deno.privateCustomInspect")]: { - value: function (inspect) { - const object = { - hash: this.hash, - host: this.host, - hostname: this.hostname, - href: this.href, - origin: this.origin, - pathname: this.pathname, - port: this.port, - protocol: this.protocol, - search: this.search, - }; - return `${this.constructor.name} ${inspect(object)}`; + value: function (inspect, inspectOptions) { + return `${this.constructor.name} ${ + inspect({ + hash: this.hash, + host: this.host, + hostname: this.hostname, + href: this.href, + origin: this.origin, + pathname: this.pathname, + port: this.port, + protocol: this.protocol, + search: this.search, + }, inspectOptions) + }`; }, }, }); |