Title: url: URLPatternInit dictionary conversion does not follow WebIDL semantics · Issue #64780 · nodejs/node · GitHub
Open Graph Title: url: URLPatternInit dictionary conversion does not follow WebIDL semantics · Issue #64780 · nodejs/node
X Title: url: URLPatternInit dictionary conversion does not follow WebIDL semantics · Issue #64780 · nodejs/node
Description: Version latest main branch Platform 7.1.4-arch1-1 Subsystem url What steps will reproduce the bug? const { URLPattern } = require('node:url'); // Member access order const accessed = []; new URLPattern(new Proxy({}, { get(target, propert...
Open Graph Description: Version latest main branch Platform 7.1.4-arch1-1 Subsystem url What steps will reproduce the bug? const { URLPattern } = require('node:url'); // Member access order const accessed = []; new URLPat...
X Description: Version latest main branch Platform 7.1.4-arch1-1 Subsystem url What steps will reproduce the bug? const { URLPattern } = require('node:url'); // Member access order const accessed = []; ne...
Opengraph URL: https://github.com/nodejs/node/issues/64780
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"url: URLPatternInit dictionary conversion does not follow WebIDL semantics","articleBody":"### Version\n\nlatest main branch\n\n### Platform\n\n```text\n7.1.4-arch1-1\n```\n\n### Subsystem\n\nurl\n\n### What steps will reproduce the bug?\n\n```js\n const { URLPattern } = require('node:url');\n\n // Member access order\n const accessed = [];\n\n new URLPattern(new Proxy({}, {\n get(target, property, receiver) {\n accessed.push(property);\n return Reflect.get(target, property, receiver);\n },\n }));\n\n console.log(accessed);\n\n // Absent members in URLPatternResult.inputs\n const pattern = new URLPattern({ pathname: '/x' });\n const input = pattern.exec({ pathname: '/x' }).inputs[0];\n\n console.log(Object.keys(input));\n console.log('protocol' in input);\n console.log({ ...input });\n```\n\n### How often does it reproduce? Is there a required condition?\n\nEvery\n\n### What is the expected behavior? Why is that the expected behavior?\n\n WebIDL dictionary members should be accessed in lexicographical order:\n\n```js\n [\n 'baseURL',\n 'hash',\n 'hostname',\n 'password',\n 'pathname',\n 'port',\n 'protocol',\n 'search',\n 'username',\n ]\n\n```\n The echoed dictionary should contain only members present after WebIDL conversion:\n\n```js\n Object.keys(input);\n // ['pathname']\n\n 'protocol' in input;\n // false\n\n { ...input };\n // { pathname: '/x' }\n```\n\n An optional member explicitly set to undefined should also be treated as absent.\n\n The member access-order difference affects the URLPattern constructor, exec(), and test(). The result-shape\n difference is observable through URLPatternResult.inputs.\n\n### What do you see instead?\n\n The members are accessed in the following order:\n\n```js\n [\n 'protocol',\n 'username',\n 'password',\n 'hostname',\n 'port',\n 'pathname',\n 'search',\n 'hash',\n 'baseURL',\n ]\n```\n\n The echoed input exposes all dictionary members:\n\n```js\n Object.keys(input);\n // [\n // 'protocol',\n // 'username',\n // 'password',\n // 'hostname',\n // 'search',\n // 'hash',\n // 'baseURL',\n // ]\n\n 'protocol' in input;\n // true\n```\n\n Absent members are enumerable own properties whose values are undefined.\n\n### Additional information\n\nRefs: https://urlpattern.spec.whatwg.org/#url-pattern-match\nRefs: https://webidl.spec.whatwg.org/#es-dictionary)\nRefs: https://webidl.spec.whatwg.org/#idl-dictionaries\nRefs: https://webidl.spec.whatwg.org/#es-dictionary)","author":{"url":"https://github.com/Archkon","@type":"Person","name":"Archkon"},"datePublished":"2026-07-27T14:13:47Z","url":"https://github.com/nodejs/node/issues/64780"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5e75702f-81d5-ce95-f516-20fac1b14609 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A44:17D884:3248FE:417ED1:6AED1DBC |
| html-safe-nonce | af4d58dc985daff07ccbf5aec9ff011da39e0dfde85ac13e71d2b8c8ca1f4cca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTQ0OjE3RDg4NDozMjQ4RkU6NDE3RUQxOjZBRUQxREJDIiwidmlzaXRvcl9pZCI6IjgyODMzNDkyODgzNTU3MDAxNTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d811a363094cde899a01b8a9d7e99cad6afb3912babf7c495ef6aaad0b308bae |
| hovercard-subject-tag | issue:4988848274 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/64780/issue_layout |
| twitter:image | https://opengraph.githubassets.com/07fa24b083b5e7b48da3df116ac989b5f5efe217b5ddad410fdca3191b78c854/nodejs/node/issues/64780 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/07fa24b083b5e7b48da3df116ac989b5f5efe217b5ddad410fdca3191b78c854/nodejs/node/issues/64780 |
| og:image:alt | Version latest main branch Platform 7.1.4-arch1-1 Subsystem url What steps will reproduce the bug? const { URLPattern } = require('node:url'); // Member access order const accessed = []; new URLPat... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Archkon |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 707a24b346ac8a82878b9c084efaa38a997660cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width