fix: open PR in firefox

This commit is contained in:
EnixCoda 2022-07-17 00:01:21 +08:00
parent 8fa1802555
commit b28c9e0fe8

View file

@ -95,7 +95,8 @@ export async function continuousLoadPages(doc: Document, onReceivePage?: (doc: D
if (!fragment) break
const src = fragment.getAttribute('src')
if (!src) break
doc = await getDOM(src)
// Using `src` directly below would fail in Firefox if the src is an absolute path
doc = await getDOM(new URL(src, window.location.origin).href)
documents.push(doc)
onReceivePage?.(doc)
}