| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -731,7 +731,9 @@ class URL { | |||
| 731 | 731 | if (path.length > 0) { | |
| 732 | 732 | try { | |
| 733 | 733 | const out = new URL(path); | |
| 734 | - if (out[context].scheme_type !== 1) { | ||
| 734 | + // 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) { | ||
| 735 | 737 | return `${out.protocol}//${out.host}`; | |
| 736 | 738 | } | |
| 737 | 739 | } catch { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,8 +15,5 @@ | |||
| 15 | 15 | }, | |
| 16 | 16 | "javascript-urls.window.js": { | |
| 17 | 17 | "skip": "requires document.body reference" | |
| 18 | - }, | ||
| 19 | - "url-origin.any.js": { | ||
| 20 | - "skip": "implementation not up to date" | ||
| 21 | 18 | } | |
| 22 | 19 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments