diff options
Diffstat (limited to 'source/helpers/fetch-dom.ts')
-rw-r--r-- | source/helpers/fetch-dom.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/helpers/fetch-dom.ts b/source/helpers/fetch-dom.ts index ccf63476..42649b6f 100644 --- a/source/helpers/fetch-dom.ts +++ b/source/helpers/fetch-dom.ts @@ -8,7 +8,7 @@ async function fetchDom(url: string): Promise<DocumentFragment>; async function fetchDom<Selector extends string, TElement extends HTMLElement = ParseSelector<Selector, HTMLElement>>(url: string, selector: Selector): Promise<TElement | undefined>; async function fetchDom(url: string, selector?: string): Promise<Node | undefined> { features.log.http(url); - const absoluteURL = new URL(url, location.origin).toString(); // Firefox `fetch`es from the content script, so relative URLs fail + const absoluteURL = new URL(url, location.origin).href; // Firefox `fetch`es from the content script, so relative URLs fail const response = await fetch(absoluteURL); const dom = domify(await response.text()); if (selector) { |