We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ec4d1f commit f50fd42Copy full SHA for f50fd42
1 file changed
epub.js
@@ -953,7 +953,7 @@ export class EPUB {
953
${doc.querySelector('parsererror').innerText}`)
954
return doc
955
}
956
- async init() {
+ async init({ allowScript = false } = {}) {
957
const $container = await this.#loadXML('META-INF/container.xml')
958
if (!$container) throw new Error('Failed to load container file')
959
@@ -980,6 +980,7 @@ ${doc.querySelector('parsererror').innerText}`)
980
.then(this.#encryption.getDecoder(uri)),
981
resources: this.resources,
982
})
983
+ this.#loader.allowScript = allowScript
984
this.transformTarget = this.#loader.eventTarget
985
this.sections = this.resources.spine.map((spineItem, index) => {
986
const { idref, linear, properties = [] } = spineItem
0 commit comments