Generate full document for comic-book iframes in order to prevent warning spam. (#60)

Prevents the document from rendering in quirks mode unnecessarily and warnings about encoding.
This commit is contained in:
Protected
2025-05-13 13:17:02 +00:00
committed by GitHub
parent 55f1a28406
commit 1e8080754c
+1 -1
View File
@@ -5,7 +5,7 @@ export const makeComicBook = ({ entries, loadBlob, getSize }, file) => {
if (cache.has(name)) return cache.get(name)
const src = URL.createObjectURL(await loadBlob(name))
const page = URL.createObjectURL(
new Blob([`<body style="margin: 0"><img src="${src}">`], { type: 'text/html' }))
new Blob([`<!DOCTYPE html><html><head><meta charset="utf-8"></head><body style="margin: 0"><img src="${src}"></body></html>`], { type: 'text/html' }))
urls.set(name, [src, page])
cache.set(name, page)
return page