Skip to content

WHATWG URLSearchParams issue #9302

Closed
Closed
@stevenvachon

Description

@stevenvachon
const URL = require("url").URL
const url = new URL("http://domain/?query1=value&query2=")
console.log( url.searchParams.get("query1") )  // undefined
url.searchParams.keys()
/*
TypeError: (intermediate value).searchParams.keys is not a function
    at [eval]:1:106
    at ContextifyScript.Script.runInThisContext (vm.js:25:33)
    at Object.exports.runInThisContext (vm.js:77:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:573:32)
    at bootstrap_node.js:345:29
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
*/

Metadata

Metadata

Assignees

No one assigned

    Labels

    urlIssues and PRs related to the legacy built-in url module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions