We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb92c4b commit f59c963Copy full SHA for f59c963
lib/internal/url.js
@@ -731,7 +731,9 @@ class URL {
731
if (path.length > 0) {
732
try {
733
const out = new URL(path);
734
- if (out[context].scheme_type !== 1) {
+ // Only return origin of scheme is `http` or `https`
735
+ // Otherwise return a new opaque origin (null).
736
+ if (out[context].scheme_type === 0 || out[context].scheme_type === 2) {
737
return `${out.protocol}//${out.host}`;
738
}
739
} catch {
test/wpt/status/url.json
@@ -15,8 +15,5 @@
15
},
16
"javascript-urls.window.js": {
17
"skip": "requires document.body reference"
18
- },
19
- "url-origin.any.js": {
20
- "skip": "implementation not up to date"
21
22
0 commit comments