mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
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:
+1
-1
@@ -5,7 +5,7 @@ export const makeComicBook = ({ entries, loadBlob, getSize }, file) => {
|
|||||||
if (cache.has(name)) return cache.get(name)
|
if (cache.has(name)) return cache.get(name)
|
||||||
const src = URL.createObjectURL(await loadBlob(name))
|
const src = URL.createObjectURL(await loadBlob(name))
|
||||||
const page = URL.createObjectURL(
|
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])
|
urls.set(name, [src, page])
|
||||||
cache.set(name, page)
|
cache.set(name, page)
|
||||||
return page
|
return page
|
||||||
|
|||||||
Reference in New Issue
Block a user