We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6e0110 commit f2670a6Copy full SHA for f2670a6
lib/internal/url.js
@@ -840,7 +840,9 @@ class URL {
840
if (path.length > 0) {
841
try {
842
const out = new URL(path);
843
- if (out.#context.scheme_type !== 1) {
+ // Only return origin of scheme is `http` or `https`
844
+ // Otherwise return a new opaque origin (null).
845
+ if (out.#context.scheme_type === 0 || out.#context.scheme_type === 2) {
846
return `${out.protocol}//${out.host}`;
847
}
848
} catch {
test/wpt/status/url.json
@@ -17,8 +17,5 @@
17
},
18
"javascript-urls.window.js": {
19
"skip": "requires document.body reference"
20
- },
21
- "url-origin.any.js": {
22
- "skip": "implementation not up to date"
23
24
0 commit comments