Skip to content

Commit 9193ea1

Browse files
committed
More debugging for EpubBookBinder
1 parent 2a740e6 commit 9193ea1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

code/epub/epub-book-binder.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { HTML_NAMESPACE, XMLNS_NAMESPACE, REVERSE_NS,
2525
isAllowedElement, isAllowedAttr, isAllowedBlobAttr } from './epub-allowlists.js';
2626
import { FileRef } from '../file-ref.js';
2727
import { XhtmlPage } from '../page.js';
28-
import { assert } from '../common/helpers.js';
28+
import { Params, assert } from '../common/helpers.js';
2929

3030
const ATTR_KTHOOM_URL = 'data-kthoom-url';
3131
const CONTAINER_FILE = 'META-INF/container.xml';
@@ -77,8 +77,12 @@ export class EPUBBookBinder extends BookBinder {
7777
beforeStart_() {
7878
let firstFile = true;
7979
this.unarchiver.addEventListener(UnarchiveEventType.EXTRACT, evt => {
80+
/** @type {import('../bitjs/archive/decompress.js').UnarchivedFile} */
8081
const theFile = evt.unarchivedFile;
8182
this.fileMap_.set(theFile.filename, theFile.fileData);
83+
if (Params['debugFetch'] === 'true') {
84+
console.log(`debugFetch: Extracted file ${theFile.filename} of size ${theFile.fileData.byteLength}`);
85+
}
8286

8387
// The first file must be 'mimetype'.
8488
if (firstFile) {

0 commit comments

Comments
 (0)