@storyteller-platform/epub 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +152 -3714
- package/dist/index.d.ts +2 -3
- package/dist/index.js +10 -12
- package/dist/upgrade.js +2 -3
- package/dist/xml.d.ts +1 -0
- package/dist/xml.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,6 @@ publications.
|
|
|
14
14
|
- [Creating from scratch](#creating-from-scratch)
|
|
15
15
|
- [Adding a chapter](#adding-a-chapter)
|
|
16
16
|
- [Writing to disk](#writing-to-disk)
|
|
17
|
-
- [Writing to a byte array](#writing-to-a-byte-array)
|
|
18
17
|
- [Upgrading an EPUB 2 to EPUB 3](#upgrading-an-epub-2-to-epub-3)
|
|
19
18
|
- [Browser support](#browser-support)
|
|
20
19
|
- [Development](#development)
|
|
@@ -98,12 +97,12 @@ scratch.
|
|
|
98
97
|
### Reading from a file
|
|
99
98
|
|
|
100
99
|
```ts
|
|
101
|
-
import { Epub } from "@storyteller-platform/epub"
|
|
100
|
+
import { Epub } from "@storyteller-platform/epub"
|
|
102
101
|
|
|
103
|
-
using epub = await Epub.from("path/to/book.epub")
|
|
102
|
+
using epub = await Epub.from("path/to/book.epub")
|
|
104
103
|
// equivalent to
|
|
105
104
|
// using epub = await Epub.using(TmpFsAdapter).from("path/to/book.epub")
|
|
106
|
-
console.log(await epub.getTitle())
|
|
105
|
+
console.log(await epub.getTitle())
|
|
107
106
|
```
|
|
108
107
|
|
|
109
108
|
If you want to be a little more efficient and not unpack the entire EPUB file
|
|
@@ -112,10 +111,10 @@ Overlays/audio contents), you can instead lazily read the contents of the EPUB
|
|
|
112
111
|
file into memory.
|
|
113
112
|
|
|
114
113
|
```ts
|
|
115
|
-
import { Epub, MemoryAdapter } from "@storyteller-platform/epub"
|
|
114
|
+
import { Epub, MemoryAdapter } from "@storyteller-platform/epub"
|
|
116
115
|
|
|
117
|
-
using epub = await Epub.using(MemoryAdapter).from("path/to/book.epub")
|
|
118
|
-
console.log(await epub.getTitle())
|
|
116
|
+
using epub = await Epub.using(MemoryAdapter).from("path/to/book.epub")
|
|
117
|
+
console.log(await epub.getTitle())
|
|
119
118
|
```
|
|
120
119
|
|
|
121
120
|
### Creating from scratch
|
|
@@ -129,9 +128,9 @@ non-core metadata may also be provided at creation time, or may be added
|
|
|
129
128
|
incrementally after creation.
|
|
130
129
|
|
|
131
130
|
```ts
|
|
132
|
-
import { randomUUID } from "node:crypto"
|
|
131
|
+
import { randomUUID } from "node:crypto"
|
|
133
132
|
|
|
134
|
-
import { Epub } from "@storyteller-platform/epub"
|
|
133
|
+
import { Epub } from "@storyteller-platform/epub"
|
|
135
134
|
|
|
136
135
|
// Implicitly uses the TmpFsAdapter
|
|
137
136
|
const epub = await Epub.create("/path/to/book.epub", {
|
|
@@ -141,15 +140,15 @@ const epub = await Epub.create("/path/to/book.epub", {
|
|
|
141
140
|
language: new Intl.Locale("en-US"),
|
|
142
141
|
// This can be any unique identifier, including UUIDs, ISBNs, etc
|
|
143
142
|
identifier: randomUUID(),
|
|
144
|
-
})
|
|
143
|
+
})
|
|
145
144
|
```
|
|
146
145
|
|
|
147
146
|
### Adding a chapter
|
|
148
147
|
|
|
149
148
|
```tsx
|
|
150
|
-
import { Epub, type ManifestItem, x } from "@storyteller-platform/epub"
|
|
149
|
+
import { Epub, type ManifestItem, x } from "@storyteller-platform/epub"
|
|
151
150
|
|
|
152
|
-
const epub = await Epub.from("path/to/book.epub")
|
|
151
|
+
const epub = await Epub.from("path/to/book.epub")
|
|
153
152
|
|
|
154
153
|
// Construct a manifest item describing the chapter
|
|
155
154
|
const manifestItem: ManifestItem = {
|
|
@@ -158,7 +157,7 @@ const manifestItem: ManifestItem = {
|
|
|
158
157
|
// EPUB archive.
|
|
159
158
|
href: "XHTML/chapter-one.xhtml",
|
|
160
159
|
mediaType: "application/xhtml+xml",
|
|
161
|
-
}
|
|
160
|
+
}
|
|
162
161
|
|
|
163
162
|
// You can specify the contents as a string
|
|
164
163
|
const contents = `<?xml version="1.0" encoding="UTF-8"?>
|
|
@@ -171,41 +170,41 @@ const contents = `<?xml version="1.0" encoding="UTF-8"?>
|
|
|
171
170
|
<h1>Chapter 1</h1>
|
|
172
171
|
<p>At first, there were s'mores.</p>
|
|
173
172
|
</body>
|
|
174
|
-
</html
|
|
173
|
+
</html>`
|
|
175
174
|
|
|
176
175
|
// Or you can specify the contents as an XML structure
|
|
177
176
|
const xmlContents = await epub.createXhtmlDocument([
|
|
178
177
|
x("h1", null, "Chapter 1"),
|
|
179
178
|
x("p", null, "At first, there were s'mores."),
|
|
180
|
-
])
|
|
179
|
+
])
|
|
181
180
|
|
|
182
181
|
// Or, using JSX
|
|
183
182
|
/** @jsxImportSource @storyteller-platform/epub */
|
|
184
183
|
const xmlContents = await epub.createXhtmlDocument([
|
|
185
184
|
<h1>Chapter 1</h1>,
|
|
186
185
|
<p>At first, there were s'mores.</p>,
|
|
187
|
-
])
|
|
186
|
+
])
|
|
188
187
|
|
|
189
188
|
// First, add the new item to the manifest, and add
|
|
190
189
|
// its contents to the publication
|
|
191
|
-
await epub.addManifestItem(manifestItem, contents, "utf-8")
|
|
190
|
+
await epub.addManifestItem(manifestItem, contents, "utf-8")
|
|
192
191
|
|
|
193
192
|
// OR, using the XMl:
|
|
194
|
-
await epub.addManifestItem(manifestItem, xmlContents, "xml")
|
|
193
|
+
await epub.addManifestItem(manifestItem, xmlContents, "xml")
|
|
195
194
|
|
|
196
195
|
// Then add the item to the spine
|
|
197
|
-
await epub.addSpineItem(manifestItem.id)
|
|
196
|
+
await epub.addSpineItem(manifestItem.id)
|
|
198
197
|
```
|
|
199
198
|
|
|
200
199
|
### Writing to disk
|
|
201
200
|
|
|
202
201
|
```ts
|
|
203
|
-
import { Epub } from "@storyteller-platform/epub"
|
|
202
|
+
import { Epub } from "@storyteller-platform/epub"
|
|
204
203
|
|
|
205
|
-
const epub = await Epub.from("path/to/book.epub")
|
|
206
|
-
await epub.setTitle("S'mores for Everyone")
|
|
204
|
+
const epub = await Epub.from("path/to/book.epub")
|
|
205
|
+
await epub.setTitle("S'mores for Everyone")
|
|
207
206
|
|
|
208
|
-
await epub.saveAndClose()
|
|
207
|
+
await epub.saveAndClose()
|
|
209
208
|
```
|
|
210
209
|
|
|
211
210
|
For more details about using the API, see the [API documentation](#epub).
|
|
@@ -219,15 +218,15 @@ However, it does support upgrading an EPUB 2 file to EPUB 3, after which you can
|
|
|
219
218
|
use the library like normal.
|
|
220
219
|
|
|
221
220
|
```ts
|
|
222
|
-
import { Epub } from "@storyteller-platform/epub"
|
|
221
|
+
import { Epub } from "@storyteller-platform/epub"
|
|
223
222
|
|
|
224
223
|
using epub = await Epub.upgrade("path/to/epub2.epub", {
|
|
225
224
|
// optional. if omitted the Epub
|
|
226
225
|
outputPath: "path/to/epub3.epub",
|
|
227
|
-
})
|
|
226
|
+
})
|
|
228
227
|
|
|
229
228
|
// if .saveAndClose() is not called and `outputPath` isn't provided, the Epub will return to it's unupgraded state
|
|
230
|
-
await epub.saveAndClose()
|
|
229
|
+
await epub.saveAndClose()
|
|
231
230
|
|
|
232
231
|
// Do Epub stuff
|
|
233
232
|
```
|
|
@@ -240,45 +239,45 @@ In the browser, currently you can only use the `MemoryAdapter` to read EPUB
|
|
|
240
239
|
files.
|
|
241
240
|
|
|
242
241
|
```tsx
|
|
243
|
-
import { useState, useEffect } from "react"
|
|
242
|
+
import { useState, useEffect } from "react"
|
|
244
243
|
|
|
245
244
|
import {
|
|
246
245
|
Epub,
|
|
247
246
|
type EpubReader,
|
|
248
247
|
MemoryAdapter,
|
|
249
|
-
} from "@storyteller-platform/epub"
|
|
248
|
+
} from "@storyteller-platform/epub"
|
|
250
249
|
|
|
251
250
|
export function BookCover(file: File) {
|
|
252
|
-
const [cover, setCover] = useState<string | null>(null)
|
|
251
|
+
const [cover, setCover] = useState<string | null>(null)
|
|
253
252
|
|
|
254
253
|
useEffect(() => {
|
|
255
|
-
let epub: EpubReader | null = null
|
|
256
|
-
let coverUrl: string | null = null
|
|
254
|
+
let epub: EpubReader | null = null
|
|
255
|
+
let coverUrl: string | null = null
|
|
257
256
|
|
|
258
257
|
async function loadCover() {
|
|
259
258
|
// unfortunately Safari does not support `using` syntax yet
|
|
260
259
|
try {
|
|
261
|
-
epub = await Epub.using(MemoryAdapter).from(file)
|
|
262
|
-
const cover = await epub.getCoverImage()
|
|
260
|
+
epub = await Epub.using(MemoryAdapter).from(file)
|
|
261
|
+
const cover = await epub.getCoverImage()
|
|
263
262
|
if (cover) {
|
|
264
|
-
coverUrl = URL.createObjectURL(new Blob([new Uint8Array(cover)]))
|
|
265
|
-
setCover(coverUrl)
|
|
263
|
+
coverUrl = URL.createObjectURL(new Blob([new Uint8Array(cover)]))
|
|
264
|
+
setCover(coverUrl)
|
|
266
265
|
}
|
|
267
266
|
} finally {
|
|
268
|
-
epub?.discardAndClose()
|
|
267
|
+
epub?.discardAndClose()
|
|
269
268
|
}
|
|
270
269
|
}
|
|
271
270
|
|
|
272
|
-
loadCover()
|
|
271
|
+
loadCover()
|
|
273
272
|
|
|
274
273
|
return () => {
|
|
275
274
|
if (coverUrl) {
|
|
276
|
-
URL.revokeObjectURL(coverUrl)
|
|
275
|
+
URL.revokeObjectURL(coverUrl)
|
|
277
276
|
}
|
|
278
|
-
}
|
|
279
|
-
}, [file])
|
|
277
|
+
}
|
|
278
|
+
}, [file])
|
|
280
279
|
|
|
281
|
-
return cover ? <img src={cover} alt="Cover" /> : null
|
|
280
|
+
return cover ? <img src={cover} alt="Cover" /> : null
|
|
282
281
|
}
|
|
283
282
|
```
|
|
284
283
|
|
|
@@ -298,7 +297,7 @@ To get started with developing in the Storyteller monorepo, check out the
|
|
|
298
297
|
|
|
299
298
|
## Epub
|
|
300
299
|
|
|
301
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
300
|
+
Defined in: [libraries/epub/src/index.tsx:351](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L351)
|
|
302
301
|
|
|
303
302
|
A single EPUB instance.
|
|
304
303
|
|
|
@@ -314,7 +313,7 @@ import {
|
|
|
314
313
|
textContent,
|
|
315
314
|
} from "@storyteller-platform/epub";
|
|
316
315
|
|
|
317
|
-
|
|
316
|
+
using epub = await Epub.from("./path/to/book.epub");
|
|
318
317
|
const title = await epub.getTitle();
|
|
319
318
|
const spineItems = await epub.getSpineItems();
|
|
320
319
|
const chptOne = spineItems[0];
|
|
@@ -325,8 +324,7 @@ const h1 = findXmlChildByName("h1", body);
|
|
|
325
324
|
const headingText = textContent(h1);
|
|
326
325
|
|
|
327
326
|
await epub.setTitle(headingText);
|
|
328
|
-
await epub.
|
|
329
|
-
await epub.close();
|
|
327
|
+
await epub.saveAndClose();
|
|
330
328
|
```
|
|
331
329
|
|
|
332
330
|
### Link
|
|
@@ -339,7 +337,7 @@ https://www.w3.org/TR/epub-33/
|
|
|
339
337
|
|
|
340
338
|
> **new Epub**(`adapterClass`, `adapter`, `inputPath`, `readonlyOverride`): [`Epub`](#epub)
|
|
341
339
|
|
|
342
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
340
|
+
Defined in: [libraries/epub/src/index.tsx:392](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L392)
|
|
343
341
|
|
|
344
342
|
Prefer the static factories ([Epub.using](#using), [Epub.from](#from),
|
|
345
343
|
[Epub.create](#create), [Epub.upgrade](#upgrade)) over calling this constructor
|
|
@@ -365,31 +363,31 @@ else should need to.
|
|
|
365
363
|
|
|
366
364
|
> `protected` **adapter**: [`EpubStorageAdapter`](#epubstorageadapter)
|
|
367
365
|
|
|
368
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
366
|
+
Defined in: [libraries/epub/src/index.tsx:394](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L394)
|
|
369
367
|
|
|
370
368
|
#### adapterClass
|
|
371
369
|
|
|
372
370
|
> `protected` **adapterClass**: [`EpubStorageAdapterClass`](#epubstorageadapterclass)
|
|
373
371
|
|
|
374
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
372
|
+
Defined in: [libraries/epub/src/index.tsx:393](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L393)
|
|
375
373
|
|
|
376
374
|
#### inputPath
|
|
377
375
|
|
|
378
376
|
> `protected` **inputPath**: `string` \| `undefined`
|
|
379
377
|
|
|
380
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
378
|
+
Defined in: [libraries/epub/src/index.tsx:395](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L395)
|
|
381
379
|
|
|
382
380
|
#### readonlyOverride
|
|
383
381
|
|
|
384
382
|
> `protected` **readonlyOverride**: `boolean` = `false`
|
|
385
383
|
|
|
386
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
384
|
+
Defined in: [libraries/epub/src/index.tsx:396](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L396)
|
|
387
385
|
|
|
388
386
|
#### storage
|
|
389
387
|
|
|
390
388
|
> `readonly` **storage**: [`EpubStorageKind`](#epubstoragekind)
|
|
391
389
|
|
|
392
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
390
|
+
Defined in: [libraries/epub/src/index.tsx:384](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L384)
|
|
393
391
|
|
|
394
392
|
Storage backend kind in use for this instance
|
|
395
393
|
|
|
@@ -403,7 +401,7 @@ and the adapter's capability bag)
|
|
|
403
401
|
|
|
404
402
|
> **\[dispose\]**(): `void`
|
|
405
403
|
|
|
406
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
404
|
+
Defined in: [libraries/epub/src/index.tsx:3316](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3316)
|
|
407
405
|
|
|
408
406
|
##### Returns
|
|
409
407
|
|
|
@@ -413,7 +411,7 @@ Defined in: [libraries/epub/src/index.tsx:3317](https://gitlab.com/storyteller-p
|
|
|
413
411
|
|
|
414
412
|
> **addCollection**(`collection`, `index?`): `Promise`\<`void`\>
|
|
415
413
|
|
|
416
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
414
|
+
Defined in: [libraries/epub/src/index.tsx:1941](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1941)
|
|
417
415
|
|
|
418
416
|
Add a collection to the EPUB metadata.
|
|
419
417
|
|
|
@@ -436,7 +434,7 @@ will be added to the end of the list.
|
|
|
436
434
|
|
|
437
435
|
> **addContributor**(`contributor`, `index?`): `Promise`\<`void`\>
|
|
438
436
|
|
|
439
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
437
|
+
Defined in: [libraries/epub/src/index.tsx:2250](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2250)
|
|
440
438
|
|
|
441
439
|
Add a contributor to the EPUB metadata.
|
|
442
440
|
|
|
@@ -466,7 +464,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
466
464
|
|
|
467
465
|
> **addCreator**(`creator`, `index?`, `type?`): `Promise`\<`void`\>
|
|
468
466
|
|
|
469
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
467
|
+
Defined in: [libraries/epub/src/index.tsx:2115](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2115)
|
|
470
468
|
|
|
471
469
|
Add a creator to the EPUB metadata.
|
|
472
470
|
|
|
@@ -496,7 +494,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
496
494
|
|
|
497
495
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
498
496
|
|
|
499
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
497
|
+
Defined in: [libraries/epub/src/index.tsx:2915](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2915)
|
|
500
498
|
|
|
501
499
|
Create a new manifest item and write its contents to a
|
|
502
500
|
new entry.
|
|
@@ -525,7 +523,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
525
523
|
|
|
526
524
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
527
525
|
|
|
528
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
526
|
+
Defined in: [libraries/epub/src/index.tsx:2920](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2920)
|
|
529
527
|
|
|
530
528
|
Create a new manifest item and write its contents to a
|
|
531
529
|
new entry.
|
|
@@ -554,7 +552,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
554
552
|
|
|
555
553
|
> **addManifestItem**(`item`, `contents`): `Promise`\<`void`\>
|
|
556
554
|
|
|
557
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
555
|
+
Defined in: [libraries/epub/src/index.tsx:2925](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2925)
|
|
558
556
|
|
|
559
557
|
Create a new manifest item and write its contents to a
|
|
560
558
|
new entry.
|
|
@@ -582,7 +580,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
582
580
|
|
|
583
581
|
> **addMetadata**(`entry`): `Promise`\<`void`\>
|
|
584
582
|
|
|
585
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
583
|
+
Defined in: [libraries/epub/src/index.tsx:3049](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3049)
|
|
586
584
|
|
|
587
585
|
Add a new metadata entry to the Epub.
|
|
588
586
|
|
|
@@ -609,7 +607,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
609
607
|
|
|
610
608
|
> **addSpineItem**(`manifestId`, `index?`): `Promise`\<`void`\>
|
|
611
609
|
|
|
612
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
610
|
+
Defined in: [libraries/epub/src/index.tsx:2316](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2316)
|
|
613
611
|
|
|
614
612
|
Add an item to the spine of the EPUB.
|
|
615
613
|
|
|
@@ -639,7 +637,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
639
637
|
|
|
640
638
|
> **addSubject**(`subject`): `Promise`\<`void`\>
|
|
641
639
|
|
|
642
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
640
|
+
Defined in: [libraries/epub/src/index.tsx:1496](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1496)
|
|
643
641
|
|
|
644
642
|
Add a subject to the EPUB metadata.
|
|
645
643
|
|
|
@@ -661,7 +659,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
|
|
|
661
659
|
|
|
662
660
|
> **copy**(`path?`): `Promise`\<[`Epub`](#epub)\>
|
|
663
661
|
|
|
664
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
662
|
+
Defined in: [libraries/epub/src/index.tsx:489](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L489)
|
|
665
663
|
|
|
666
664
|
##### Parameters
|
|
667
665
|
|
|
@@ -677,7 +675,7 @@ Defined in: [libraries/epub/src/index.tsx:490](https://gitlab.com/storyteller-pl
|
|
|
677
675
|
|
|
678
676
|
> **createXhtmlDocument**(`body`, `head?`, `language?`): `Promise`\<[`Document`](#document-1)\>
|
|
679
677
|
|
|
680
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
678
|
+
Defined in: [libraries/epub/src/index.tsx:2715](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2715)
|
|
681
679
|
|
|
682
680
|
Create a new XHTML document with the given body
|
|
683
681
|
and head.
|
|
@@ -698,7 +696,7 @@ and head.
|
|
|
698
696
|
|
|
699
697
|
> **createXmlDocument**(`root`): [`Document`](#document-1)
|
|
700
698
|
|
|
701
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
699
|
+
Defined in: [libraries/epub/src/index.tsx:2679](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2679)
|
|
702
700
|
|
|
703
701
|
Create a new XML document with the given root node.
|
|
704
702
|
|
|
@@ -716,7 +714,7 @@ Create a new XML document with the given root node.
|
|
|
716
714
|
|
|
717
715
|
> **discardAndClose**(): `void`
|
|
718
716
|
|
|
719
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
717
|
+
Defined in: [libraries/epub/src/index.tsx:3266](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3266)
|
|
720
718
|
|
|
721
719
|
##### Returns
|
|
722
720
|
|
|
@@ -726,7 +724,7 @@ Defined in: [libraries/epub/src/index.tsx:3267](https://gitlab.com/storyteller-p
|
|
|
726
724
|
|
|
727
725
|
> **findAllMetadataItems**(`predicate`): `Promise`\<[`MetadataEntry`](#metadataentry)[]\>
|
|
728
726
|
|
|
729
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
727
|
+
Defined in: [libraries/epub/src/index.tsx:743](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L743)
|
|
730
728
|
|
|
731
729
|
Returns the item in the metadata element's children array
|
|
732
730
|
that matches the provided predicate.
|
|
@@ -745,7 +743,7 @@ that matches the provided predicate.
|
|
|
745
743
|
|
|
746
744
|
> **findMetadataItem**(`predicate`): `Promise`\<[`MetadataEntry`](#metadataentry) \| `null`\>
|
|
747
745
|
|
|
748
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
746
|
+
Defined in: [libraries/epub/src/index.tsx:734](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L734)
|
|
749
747
|
|
|
750
748
|
Returns the item in the metadata element's children array
|
|
751
749
|
that matches the provided predicate.
|
|
@@ -764,7 +762,7 @@ that matches the provided predicate.
|
|
|
764
762
|
|
|
765
763
|
> **getBaseDirection**(): `Promise`\<`"auto"` \| `"rtl"` \| `"ltr"`\>
|
|
766
764
|
|
|
767
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
765
|
+
Defined in: [libraries/epub/src/index.tsx:1450](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1450)
|
|
768
766
|
|
|
769
767
|
Retrieve the base direction from the package element.
|
|
770
768
|
|
|
@@ -783,7 +781,7 @@ https://www.w3.org/TR/epub-33/#attrdef-dir
|
|
|
783
781
|
|
|
784
782
|
> **getCollections**(): `Promise`\<[`Collection`](#collection)[]\>
|
|
785
783
|
|
|
786
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
784
|
+
Defined in: [libraries/epub/src/index.tsx:1901](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1901)
|
|
787
785
|
|
|
788
786
|
Retrieve the list of collections.
|
|
789
787
|
|
|
@@ -795,7 +793,7 @@ Retrieve the list of collections.
|
|
|
795
793
|
|
|
796
794
|
> **getContributors**(): `Promise`\<[`DcCreator`](#dccreator)[]\>
|
|
797
795
|
|
|
798
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
796
|
+
Defined in: [libraries/epub/src/index.tsx:2102](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2102)
|
|
799
797
|
|
|
800
798
|
Retrieve the list of contributors.
|
|
801
799
|
|
|
@@ -814,7 +812,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccontributor
|
|
|
814
812
|
|
|
815
813
|
> **getCoverImage**(): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\> \| `null`\>
|
|
816
814
|
|
|
817
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
815
|
+
Defined in: [libraries/epub/src/index.tsx:1346](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1346)
|
|
818
816
|
|
|
819
817
|
Retrieve the cover image data as a byte array.
|
|
820
818
|
|
|
@@ -834,7 +832,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
|
|
|
834
832
|
|
|
835
833
|
> **getCoverImageItem**(): `Promise`\<[`ManifestItem`](#manifestitem) \| `null`\>
|
|
836
834
|
|
|
837
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
835
|
+
Defined in: [libraries/epub/src/index.tsx:1327](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1327)
|
|
838
836
|
|
|
839
837
|
Retrieve the cover image manifest item.
|
|
840
838
|
|
|
@@ -855,7 +853,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
|
|
|
855
853
|
|
|
856
854
|
> **getCreators**(`type`): `Promise`\<[`DcCreator`](#dccreator)[]\>
|
|
857
855
|
|
|
858
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
856
|
+
Defined in: [libraries/epub/src/index.tsx:2038](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2038)
|
|
859
857
|
|
|
860
858
|
Retrieve the list of creators.
|
|
861
859
|
|
|
@@ -877,7 +875,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
877
875
|
|
|
878
876
|
> **getDescription**(): `Promise`\<`string` \| `null`\>
|
|
879
877
|
|
|
880
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
878
|
+
Defined in: [libraries/epub/src/index.tsx:1769](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1769)
|
|
881
879
|
|
|
882
880
|
Retrieve the Epub's description as specified in its
|
|
883
881
|
package document metadata.
|
|
@@ -894,7 +892,7 @@ include HTML markup.
|
|
|
894
892
|
|
|
895
893
|
> **getGuideEntries**(): `Promise`\<[`GuideItem`](#guideitem)[]\>
|
|
896
894
|
|
|
897
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
895
|
+
Defined in: [libraries/epub/src/index.tsx:3249](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3249)
|
|
898
896
|
|
|
899
897
|
Retrieve the guide entries from the package document.
|
|
900
898
|
|
|
@@ -909,7 +907,7 @@ the landmarks nav, but many publications still include it.
|
|
|
909
907
|
|
|
910
908
|
> **getIdentifier**(): `Promise`\<`string` \| `null`\>
|
|
911
909
|
|
|
912
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
910
|
+
Defined in: [libraries/epub/src/index.tsx:835](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L835)
|
|
913
911
|
|
|
914
912
|
Retrieve the first identifier from the dc:identifier element
|
|
915
913
|
in the EPUB metadata.
|
|
@@ -933,7 +931,7 @@ or [getIdentifiers](#getidentifiers) to get all identifiers.
|
|
|
933
931
|
|
|
934
932
|
> **getIdentifiers**(): `Promise`\<[`EpubIdentifier`](#epubidentifier)[]\>
|
|
935
933
|
|
|
936
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
934
|
+
Defined in: [libraries/epub/src/index.tsx:1001](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1001)
|
|
937
935
|
|
|
938
936
|
Retrieve every `dc:identifier` entry, returned as found.
|
|
939
937
|
|
|
@@ -954,7 +952,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
954
952
|
|
|
955
953
|
> **getItemArchiveLength**(`id`): `Promise`\<`number`\>
|
|
956
954
|
|
|
957
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
955
|
+
Defined in: [libraries/epub/src/index.tsx:515](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L515)
|
|
958
956
|
|
|
959
957
|
Length of the underlying archive entry for a manifest item, in bytes
|
|
960
958
|
Necessary to compute the readium page count which is for COMPRESSED content
|
|
@@ -977,7 +975,7 @@ Necessary to compute the readium page count which is for COMPRESSED content
|
|
|
977
975
|
|
|
978
976
|
> **getLandmarks**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
|
|
979
977
|
|
|
980
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
978
|
+
Defined in: [libraries/epub/src/index.tsx:2501](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2501)
|
|
981
979
|
|
|
982
980
|
Returns the structured landmarks navigation document
|
|
983
981
|
as a Navigation object
|
|
@@ -1001,7 +999,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-landmarks
|
|
|
1001
999
|
|
|
1002
1000
|
> **getLanguage**(): `Promise`\<`Locale` \| `null`\>
|
|
1003
1001
|
|
|
1004
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1002
|
+
Defined in: [libraries/epub/src/index.tsx:1606](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1606)
|
|
1005
1003
|
|
|
1006
1004
|
Retrieve the Epub's language as specified in its
|
|
1007
1005
|
package document metadata.
|
|
@@ -1021,7 +1019,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
|
|
|
1021
1019
|
|
|
1022
1020
|
> **getLayout**(): `Promise`\<`"pre-paginated"` \| `"reflowable"`\>
|
|
1023
1021
|
|
|
1024
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1022
|
+
Defined in: [libraries/epub/src/index.tsx:1431](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1431)
|
|
1025
1023
|
|
|
1026
1024
|
Retrieve the layout from the rendition:layout meta element
|
|
1027
1025
|
in the EPUB metadata.
|
|
@@ -1040,7 +1038,7 @@ https://www.w3.org/TR/epub-33/#layout
|
|
|
1040
1038
|
|
|
1041
1039
|
> **getManifest**(): `Promise`\<`Record`\<`string`, [`ManifestItem`](#manifestitem)\>\>
|
|
1042
1040
|
|
|
1043
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1041
|
+
Defined in: [libraries/epub/src/index.tsx:661](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L661)
|
|
1044
1042
|
|
|
1045
1043
|
Retrieve the manifest for the Epub.
|
|
1046
1044
|
|
|
@@ -1059,7 +1057,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
|
|
|
1059
1057
|
|
|
1060
1058
|
> **getMetadata**(): `Promise`\<[`EpubMetadata`](#epubmetadata)\>
|
|
1061
1059
|
|
|
1062
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1060
|
+
Defined in: [libraries/epub/src/index.tsx:803](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L803)
|
|
1063
1061
|
|
|
1064
1062
|
Retrieve the metadata entries for the Epub.
|
|
1065
1063
|
|
|
@@ -1081,7 +1079,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1081
1079
|
|
|
1082
1080
|
> **getModifiedDate**(): `Promise`\<`Date` \| `null`\>
|
|
1083
1081
|
|
|
1084
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1082
|
+
Defined in: [libraries/epub/src/index.tsx:1414](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1414)
|
|
1085
1083
|
|
|
1086
1084
|
Retrieve the modified date from the dcterms:modified metadata
|
|
1087
1085
|
in the EPUB metadata as a Date object.
|
|
@@ -1100,7 +1098,7 @@ https://www.w3.org/TR/epub-33/#sec-metadata-last-modified
|
|
|
1100
1098
|
|
|
1101
1099
|
> **getNcxTableOfContents**(): `Promise`\<[`NavigationList`](#navigationlist)\>
|
|
1102
1100
|
|
|
1103
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1101
|
+
Defined in: [libraries/epub/src/index.tsx:3173](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3173)
|
|
1104
1102
|
|
|
1105
1103
|
Parse the NCX table of contents, if one exists, and return
|
|
1106
1104
|
a tree of TocEntry nodes.
|
|
@@ -1117,7 +1115,7 @@ NCX for backwards compatibility.
|
|
|
1117
1115
|
|
|
1118
1116
|
> **getPackageDocumentSource**(): `Promise`\<`string`\>
|
|
1119
1117
|
|
|
1120
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1118
|
+
Defined in: [libraries/epub/src/index.tsx:569](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L569)
|
|
1121
1119
|
|
|
1122
1120
|
##### Returns
|
|
1123
1121
|
|
|
@@ -1127,7 +1125,7 @@ Defined in: [libraries/epub/src/index.tsx:570](https://gitlab.com/storyteller-pl
|
|
|
1127
1125
|
|
|
1128
1126
|
> **getPackageElement**(): `Promise`\<[`Element`](#element-1)\>
|
|
1129
1127
|
|
|
1130
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1128
|
+
Defined in: [libraries/epub/src/index.tsx:592](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L592)
|
|
1131
1129
|
|
|
1132
1130
|
##### Returns
|
|
1133
1131
|
|
|
@@ -1137,7 +1135,7 @@ Defined in: [libraries/epub/src/index.tsx:593](https://gitlab.com/storyteller-pl
|
|
|
1137
1135
|
|
|
1138
1136
|
> **getPackageVocabularyPrefixes**(): `Promise`\<`Record`\<`string`, `string`\>\>
|
|
1139
1137
|
|
|
1140
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1138
|
+
Defined in: [libraries/epub/src/index.tsx:1786](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1786)
|
|
1141
1139
|
|
|
1142
1140
|
Return the set of custom vocabulary prefixes set on this publication's
|
|
1143
1141
|
root package element.
|
|
@@ -1156,7 +1154,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
|
1156
1154
|
|
|
1157
1155
|
> **getPageBreakSource**(): `Promise`\<[`EpubSource`](#epubsource) \| `null`\>
|
|
1158
1156
|
|
|
1159
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1157
|
+
Defined in: [libraries/epub/src/index.tsx:1038](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1038)
|
|
1160
1158
|
|
|
1161
1159
|
Retrieve the `pageBreakSource` property (EPUB 3.4, spec D.2.9), the
|
|
1162
1160
|
publication-level source for the source of its page break markers.
|
|
@@ -1177,7 +1175,7 @@ https://www.w3.org/TR/epub/#pageBreakSource
|
|
|
1177
1175
|
|
|
1178
1176
|
> **getPageList**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
|
|
1179
1177
|
|
|
1180
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1178
|
+
Defined in: [libraries/epub/src/index.tsx:2513](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2513)
|
|
1181
1179
|
|
|
1182
1180
|
Returns the structured page list navigation document
|
|
1183
1181
|
as a Navigation object
|
|
@@ -1201,7 +1199,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-landmarks
|
|
|
1201
1199
|
|
|
1202
1200
|
> **getPublicationDate**(): `Promise`\<`Date` \| `null`\>
|
|
1203
1201
|
|
|
1204
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1202
|
+
Defined in: [libraries/epub/src/index.tsx:1383](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1383)
|
|
1205
1203
|
|
|
1206
1204
|
Retrieve the publication date from the dc:date element
|
|
1207
1205
|
in the EPUB metadata as a Date object.
|
|
@@ -1220,7 +1218,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
1220
1218
|
|
|
1221
1219
|
> **getRootfile**(): `Promise`\<`string`\>
|
|
1222
1220
|
|
|
1223
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1221
|
+
Defined in: [libraries/epub/src/index.tsx:526](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L526)
|
|
1224
1222
|
|
|
1225
1223
|
##### Returns
|
|
1226
1224
|
|
|
@@ -1230,7 +1228,7 @@ Defined in: [libraries/epub/src/index.tsx:527](https://gitlab.com/storyteller-pl
|
|
|
1230
1228
|
|
|
1231
1229
|
> **getSources**(): `Promise`\<[`EpubSource`](#epubsource)[]\>
|
|
1232
1230
|
|
|
1233
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1231
|
+
Defined in: [libraries/epub/src/index.tsx:1015](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1015)
|
|
1234
1232
|
|
|
1235
1233
|
Retrieve every `dc:source` entry, returned as found.
|
|
1236
1234
|
|
|
@@ -1250,7 +1248,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
|
|
|
1250
1248
|
|
|
1251
1249
|
> **getSpineItems**(): `Promise`\<[`ManifestItem`](#manifestitem) & `object`[]\>
|
|
1252
1250
|
|
|
1253
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1251
|
+
Defined in: [libraries/epub/src/index.tsx:2289](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2289)
|
|
1254
1252
|
|
|
1255
1253
|
Retrieve the manifest items that make up the Epub's spine.
|
|
1256
1254
|
|
|
@@ -1269,7 +1267,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
1269
1267
|
|
|
1270
1268
|
> **getSubjects**(): `Promise`\<(`string` \| [`DcSubject`](#dcsubject))[]\>
|
|
1271
1269
|
|
|
1272
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1270
|
+
Defined in: [libraries/epub/src/index.tsx:1561](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1561)
|
|
1273
1271
|
|
|
1274
1272
|
Retrieve the list of subjects for this EPUB.
|
|
1275
1273
|
|
|
@@ -1290,7 +1288,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
|
|
|
1290
1288
|
|
|
1291
1289
|
> **getSubtitle**(): `Promise`\<`string` \| `null`\>
|
|
1292
1290
|
|
|
1293
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1291
|
+
Defined in: [libraries/epub/src/index.tsx:1676](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1676)
|
|
1294
1292
|
|
|
1295
1293
|
Retrieve the subtitle of the Epub, if it exists.
|
|
1296
1294
|
|
|
@@ -1306,7 +1304,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1306
1304
|
|
|
1307
1305
|
> **getTableOfContents**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
|
|
1308
1306
|
|
|
1309
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1307
|
+
Defined in: [libraries/epub/src/index.tsx:2483](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2483)
|
|
1310
1308
|
|
|
1311
1309
|
Returns the structured table of contents navigation document
|
|
1312
1310
|
as a Navigation object.
|
|
@@ -1330,7 +1328,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-toc
|
|
|
1330
1328
|
|
|
1331
1329
|
> **getTitle**(`expanded`): `Promise`\<`string` \| `null`\>
|
|
1332
1330
|
|
|
1333
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1331
|
+
Defined in: [libraries/epub/src/index.tsx:1652](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1652)
|
|
1334
1332
|
|
|
1335
1333
|
Retrieve the title of the Epub.
|
|
1336
1334
|
|
|
@@ -1352,7 +1350,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1352
1350
|
|
|
1353
1351
|
> **getTitles**(): `Promise`\<`object`[]\>
|
|
1354
1352
|
|
|
1355
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1353
|
+
Defined in: [libraries/epub/src/index.tsx:1688](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1688)
|
|
1356
1354
|
|
|
1357
1355
|
Retrieve all title entries of the Epub.
|
|
1358
1356
|
|
|
@@ -1368,7 +1366,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1368
1366
|
|
|
1369
1367
|
> **getType**(): `Promise`\<[`MetadataEntry`](#metadataentry) \| `null`\>
|
|
1370
1368
|
|
|
1371
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1369
|
+
Defined in: [libraries/epub/src/index.tsx:1483](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1483)
|
|
1372
1370
|
|
|
1373
1371
|
Retrieve the publication type from the dc:type element
|
|
1374
1372
|
in the EPUB metadata.
|
|
@@ -1387,7 +1385,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
1387
1385
|
|
|
1388
1386
|
> **getUniqueIdentifier**(): `Promise`\<`string` \| `null`\>
|
|
1389
1387
|
|
|
1390
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1388
|
+
Defined in: [libraries/epub/src/index.tsx:867](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L867)
|
|
1391
1389
|
|
|
1392
1390
|
Retrieve the identifier with the unique identifier id
|
|
1393
1391
|
in the EPUB metadata.
|
|
@@ -1406,7 +1404,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1406
1404
|
|
|
1407
1405
|
> **getUniqueIdentifierId**(): `Promise`\<`string` \| `null`\>
|
|
1408
1406
|
|
|
1409
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1407
|
+
Defined in: [libraries/epub/src/index.tsx:939](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L939)
|
|
1410
1408
|
|
|
1411
1409
|
Retrieve the id of the publication's unique identifier, as declared by the
|
|
1412
1410
|
package element's `unique-identifier` attribute.
|
|
@@ -1423,7 +1421,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1423
1421
|
|
|
1424
1422
|
> **getVersion**(): `Promise`\<`string`\>
|
|
1425
1423
|
|
|
1426
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1424
|
+
Defined in: [libraries/epub/src/index.tsx:3160](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3160)
|
|
1427
1425
|
|
|
1428
1426
|
Returns the EPUB version declared on the package element.
|
|
1429
1427
|
|
|
@@ -1437,7 +1435,7 @@ Returns the EPUB version declared on the package element.
|
|
|
1437
1435
|
|
|
1438
1436
|
> **readFileContents**(`href`, `relativeTo?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1439
1437
|
|
|
1440
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1438
|
+
Defined in: [libraries/epub/src/index.tsx:2620](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2620)
|
|
1441
1439
|
|
|
1442
1440
|
Retrieve the contents of a file, given its href.
|
|
1443
1441
|
|
|
@@ -1459,7 +1457,7 @@ and an encoding parameter.
|
|
|
1459
1457
|
|
|
1460
1458
|
> **readFileContents**(`href`, `relativeTo`, `encoding`): `Promise`\<`string`\>
|
|
1461
1459
|
|
|
1462
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1460
|
+
Defined in: [libraries/epub/src/index.tsx:2621](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2621)
|
|
1463
1461
|
|
|
1464
1462
|
Retrieve the contents of a file, given its href.
|
|
1465
1463
|
|
|
@@ -1484,7 +1482,7 @@ and an encoding parameter.
|
|
|
1484
1482
|
|
|
1485
1483
|
> **readItemContents**(`id`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1486
1484
|
|
|
1487
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1485
|
+
Defined in: [libraries/epub/src/index.tsx:2653](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2653)
|
|
1488
1486
|
|
|
1489
1487
|
Retrieve the contents of a manifest item, given its id.
|
|
1490
1488
|
|
|
@@ -1506,7 +1504,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1506
1504
|
|
|
1507
1505
|
> **readItemContents**(`id`, `encoding`): `Promise`\<`string`\>
|
|
1508
1506
|
|
|
1509
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1507
|
+
Defined in: [libraries/epub/src/index.tsx:2654](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2654)
|
|
1510
1508
|
|
|
1511
1509
|
Retrieve the contents of a manifest item, given its id.
|
|
1512
1510
|
|
|
@@ -1531,7 +1529,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1531
1529
|
|
|
1532
1530
|
> **readXhtmlItemContents**(`id`, `as?`): `Promise`\<[`Document`](#document-1)\>
|
|
1533
1531
|
|
|
1534
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1532
|
+
Defined in: [libraries/epub/src/index.tsx:2765](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2765)
|
|
1535
1533
|
|
|
1536
1534
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1537
1535
|
|
|
@@ -1554,7 +1552,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1554
1552
|
|
|
1555
1553
|
> **readXhtmlItemContents**(`id`, `as`): `Promise`\<`string`\>
|
|
1556
1554
|
|
|
1557
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1555
|
+
Defined in: [libraries/epub/src/index.tsx:2766](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2766)
|
|
1558
1556
|
|
|
1559
1557
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1560
1558
|
|
|
@@ -1577,7 +1575,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1577
1575
|
|
|
1578
1576
|
> **removeCollection**(`index`): `Promise`\<`void`\>
|
|
1579
1577
|
|
|
1580
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1578
|
+
Defined in: [libraries/epub/src/index.tsx:2005](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2005)
|
|
1581
1579
|
|
|
1582
1580
|
Remove a collection from the EPUB metadata.
|
|
1583
1581
|
|
|
@@ -1598,7 +1596,7 @@ refers to the array returned by `epub.getCollections()`.
|
|
|
1598
1596
|
|
|
1599
1597
|
> **removeContributor**(`index`): `Promise`\<`void`\>
|
|
1600
1598
|
|
|
1601
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1599
|
+
Defined in: [libraries/epub/src/index.tsx:2234](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2234)
|
|
1602
1600
|
|
|
1603
1601
|
Remove a contributor from the EPUB metadata.
|
|
1604
1602
|
|
|
@@ -1626,7 +1624,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1626
1624
|
|
|
1627
1625
|
> **removeCreator**(`index`, `type`): `Promise`\<`void`\>
|
|
1628
1626
|
|
|
1629
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1627
|
+
Defined in: [libraries/epub/src/index.tsx:2197](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2197)
|
|
1630
1628
|
|
|
1631
1629
|
Remove a creator from the EPUB metadata.
|
|
1632
1630
|
|
|
@@ -1652,7 +1650,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1652
1650
|
|
|
1653
1651
|
> **removeManifestItem**(`id`): `Promise`\<`void`\>
|
|
1654
1652
|
|
|
1655
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1653
|
+
Defined in: [libraries/epub/src/index.tsx:2865](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2865)
|
|
1656
1654
|
|
|
1657
1655
|
##### Parameters
|
|
1658
1656
|
|
|
@@ -1668,7 +1666,7 @@ Defined in: [libraries/epub/src/index.tsx:2866](https://gitlab.com/storyteller-p
|
|
|
1668
1666
|
|
|
1669
1667
|
> **removeMetadata**(`predicate`): `Promise`\<`void`\>
|
|
1670
1668
|
|
|
1671
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1669
|
+
Defined in: [libraries/epub/src/index.tsx:3135](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3135)
|
|
1672
1670
|
|
|
1673
1671
|
Remove one or more metadata entries.
|
|
1674
1672
|
|
|
@@ -1694,7 +1692,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1694
1692
|
|
|
1695
1693
|
> **removeSpineItem**(`index`): `Promise`\<`void`\>
|
|
1696
1694
|
|
|
1697
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1695
|
+
Defined in: [libraries/epub/src/index.tsx:2362](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2362)
|
|
1698
1696
|
|
|
1699
1697
|
Remove the spine item at the specified index.
|
|
1700
1698
|
|
|
@@ -1716,7 +1714,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
1716
1714
|
|
|
1717
1715
|
> **removeSubject**(`index`): `Promise`\<`void`\>
|
|
1718
1716
|
|
|
1719
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1717
|
+
Defined in: [libraries/epub/src/index.tsx:1533](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1533)
|
|
1720
1718
|
|
|
1721
1719
|
Remove a subject from the EPUB metadata.
|
|
1722
1720
|
|
|
@@ -1741,7 +1739,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1741
1739
|
|
|
1742
1740
|
> **replaceMetadata**(`predicate`, `entry`): `Promise`\<`void`\>
|
|
1743
1741
|
|
|
1744
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1742
|
+
Defined in: [libraries/epub/src/index.tsx:3084](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3084)
|
|
1745
1743
|
|
|
1746
1744
|
Replace a metadata entry with a new one.
|
|
1747
1745
|
|
|
@@ -1768,7 +1766,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1768
1766
|
|
|
1769
1767
|
> **resolveHref**(`href`, `relativeTo?`, `__namedParameters?`): `Promise`\<`string`\>
|
|
1770
1768
|
|
|
1771
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1769
|
+
Defined in: [libraries/epub/src/index.tsx:2576](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2576)
|
|
1772
1770
|
|
|
1773
1771
|
Returns a path-relative-scheme-less URL, relative to the
|
|
1774
1772
|
container root.
|
|
@@ -1793,7 +1791,7 @@ a navigation document, is handed back unchanged.
|
|
|
1793
1791
|
|
|
1794
1792
|
> **saveAndClose**(): `Promise`\<`void`\>
|
|
1795
1793
|
|
|
1796
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1794
|
+
Defined in: [libraries/epub/src/index.tsx:3281](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3281)
|
|
1797
1795
|
|
|
1798
1796
|
Write the current contents of the Epub to a new
|
|
1799
1797
|
EPUB archive on disk.
|
|
@@ -1810,7 +1808,7 @@ timestamp.
|
|
|
1810
1808
|
|
|
1811
1809
|
> **setCoverImage**(`href`, `data`): `Promise`\<`void`\>
|
|
1812
1810
|
|
|
1813
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1811
|
+
Defined in: [libraries/epub/src/index.tsx:1360](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1360)
|
|
1814
1812
|
|
|
1815
1813
|
Set the cover image for the EPUB.
|
|
1816
1814
|
|
|
@@ -1833,7 +1831,7 @@ the provided href within the publication.
|
|
|
1833
1831
|
|
|
1834
1832
|
> **setDescription**(`description`): `Promise`\<`void`\>
|
|
1835
1833
|
|
|
1836
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1834
|
+
Defined in: [libraries/epub/src/index.tsx:1753](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1753)
|
|
1837
1835
|
|
|
1838
1836
|
Update the Epub's description metadata entry.
|
|
1839
1837
|
|
|
@@ -1855,7 +1853,7 @@ Otherwise creates a new element. Any non-ASCII symbols,
|
|
|
1855
1853
|
|
|
1856
1854
|
> **setIdentifier**(`identifier`): `Promise`\<`void`\>
|
|
1857
1855
|
|
|
1858
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1856
|
+
Defined in: [libraries/epub/src/index.tsx:851](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L851)
|
|
1859
1857
|
|
|
1860
1858
|
Set the dc:identifier metadata element with the provided string.
|
|
1861
1859
|
|
|
@@ -1884,7 +1882,7 @@ Use [setUniqueIdentifier](#setuniqueidentifier) instead.
|
|
|
1884
1882
|
|
|
1885
1883
|
> **setIdentifiers**(`identifiers`): `Promise`\<`void`\>
|
|
1886
1884
|
|
|
1887
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1885
|
+
Defined in: [libraries/epub/src/index.tsx:1107](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1107)
|
|
1888
1886
|
|
|
1889
1887
|
Replace the publication's `dc:identifier` entries.
|
|
1890
1888
|
|
|
@@ -1921,7 +1919,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1921
1919
|
|
|
1922
1920
|
> **setLanguage**(`locale`): `Promise`\<`void`\>
|
|
1923
1921
|
|
|
1924
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1922
|
+
Defined in: [libraries/epub/src/index.tsx:1635](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1635)
|
|
1925
1923
|
|
|
1926
1924
|
Update the Epub's language metadata entry.
|
|
1927
1925
|
|
|
@@ -1946,7 +1944,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
|
|
|
1946
1944
|
|
|
1947
1945
|
> **setPackageVocabularyPrefix**(`prefix`, `uri`): `Promise`\<`void`\>
|
|
1948
1946
|
|
|
1949
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1947
|
+
Defined in: [libraries/epub/src/index.tsx:1804](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1804)
|
|
1950
1948
|
|
|
1951
1949
|
Set a custom vocabulary prefix on the root package element.
|
|
1952
1950
|
|
|
@@ -1969,7 +1967,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
|
1969
1967
|
|
|
1970
1968
|
> **setPageBreakSource**(`value`): `Promise`\<`void`\>
|
|
1971
1969
|
|
|
1972
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1970
|
+
Defined in: [libraries/epub/src/index.tsx:1074](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1074)
|
|
1973
1971
|
|
|
1974
1972
|
Set the `pageBreakSource` property (EPUB 3.4, spec D.2.9), or remove it when
|
|
1975
1973
|
passed null. Replaces an existing `pageBreakSource` meta if present.
|
|
@@ -1994,7 +1992,7 @@ https://www.w3.org/TR/epub/#pageBreakSource
|
|
|
1994
1992
|
|
|
1995
1993
|
> **setPublicationDate**(`date`): `Promise`\<`void`\>
|
|
1996
1994
|
|
|
1997
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1995
|
+
Defined in: [libraries/epub/src/index.tsx:1398](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1398)
|
|
1998
1996
|
|
|
1999
1997
|
Set the dc:date metadata element with the provided date.
|
|
2000
1998
|
|
|
@@ -2019,7 +2017,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
2019
2017
|
|
|
2020
2018
|
> **setSources**(`sources`): `Promise`\<`void`\>
|
|
2021
2019
|
|
|
2022
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2020
|
+
Defined in: [libraries/epub/src/index.tsx:1212](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1212)
|
|
2023
2021
|
|
|
2024
2022
|
Replace the publication's `dc:source` entries.
|
|
2025
2023
|
|
|
@@ -2050,7 +2048,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
|
|
|
2050
2048
|
|
|
2051
2049
|
> **setTitle**(`title`): `Promise`\<`void`\>
|
|
2052
2050
|
|
|
2053
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2051
|
+
Defined in: [libraries/epub/src/index.tsx:1830](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1830)
|
|
2054
2052
|
|
|
2055
2053
|
Set the title of the Epub.
|
|
2056
2054
|
|
|
@@ -2077,7 +2075,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
2077
2075
|
|
|
2078
2076
|
> **setTitles**(`entries`): `Promise`\<`void`\>
|
|
2079
2077
|
|
|
2080
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2078
|
+
Defined in: [libraries/epub/src/index.tsx:1852](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1852)
|
|
2081
2079
|
|
|
2082
2080
|
##### Parameters
|
|
2083
2081
|
|
|
@@ -2093,7 +2091,7 @@ Defined in: [libraries/epub/src/index.tsx:1853](https://gitlab.com/storyteller-p
|
|
|
2093
2091
|
|
|
2094
2092
|
> **setType**(`type`): `Promise`\<`void`\>
|
|
2095
2093
|
|
|
2096
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2094
|
+
Defined in: [libraries/epub/src/index.tsx:1467](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1467)
|
|
2097
2095
|
|
|
2098
2096
|
Set the dc:type metadata element.
|
|
2099
2097
|
|
|
@@ -2118,7 +2116,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
2118
2116
|
|
|
2119
2117
|
> **setUniqueIdentifier**(`identifier`): `Promise`\<`void`\>
|
|
2120
2118
|
|
|
2121
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2119
|
+
Defined in: [libraries/epub/src/index.tsx:892](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L892)
|
|
2122
2120
|
|
|
2123
2121
|
Set the unique identifier id for the EPUB.
|
|
2124
2122
|
|
|
@@ -2145,7 +2143,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
2145
2143
|
|
|
2146
2144
|
> **updateManifestItem**(`id`, `newItem`): `Promise`\<`void`\>
|
|
2147
2145
|
|
|
2148
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2146
|
+
Defined in: [libraries/epub/src/index.tsx:3001](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3001)
|
|
2149
2147
|
|
|
2150
2148
|
Update the manifest entry for an existing item.
|
|
2151
2149
|
|
|
@@ -2171,7 +2169,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
|
|
|
2171
2169
|
|
|
2172
2170
|
> **withPackage**(`producer`): `Promise`\<`void`\>
|
|
2173
2171
|
|
|
2174
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2172
|
+
Defined in: [libraries/epub/src/index.tsx:621](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L621)
|
|
2175
2173
|
|
|
2176
2174
|
Safely modify the package document, without race conditions.
|
|
2177
2175
|
|
|
@@ -2196,7 +2194,7 @@ method uses a mutex to ensure that each update runs exclusively.
|
|
|
2196
2194
|
|
|
2197
2195
|
> **writeItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
2198
2196
|
|
|
2199
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2197
|
+
Defined in: [libraries/epub/src/index.tsx:2821](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2821)
|
|
2200
2198
|
|
|
2201
2199
|
Write new contents for an existing manifest item,
|
|
2202
2200
|
specified by its id.
|
|
@@ -2223,7 +2221,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
2223
2221
|
|
|
2224
2222
|
> **writeItemContents**(`id`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
2225
2223
|
|
|
2226
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2224
|
+
Defined in: [libraries/epub/src/index.tsx:2822](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2822)
|
|
2227
2225
|
|
|
2228
2226
|
Write new contents for an existing manifest item,
|
|
2229
2227
|
specified by its id.
|
|
@@ -2251,7 +2249,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
2251
2249
|
|
|
2252
2250
|
> **writeXhtmlItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
2253
2251
|
|
|
2254
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2252
|
+
Defined in: [libraries/epub/src/index.tsx:2861](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2861)
|
|
2255
2253
|
|
|
2256
2254
|
Write new contents for an existing XHTML item,
|
|
2257
2255
|
specified by its id.
|
|
@@ -2278,7 +2276,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
2278
2276
|
|
|
2279
2277
|
> `static` **assertEpub3**(`epub`): `Promise`\<`void`\>
|
|
2280
2278
|
|
|
2281
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2279
|
+
Defined in: [libraries/epub/src/index.tsx:479](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L479)
|
|
2282
2280
|
|
|
2283
2281
|
##### Parameters
|
|
2284
2282
|
|
|
@@ -2294,7 +2292,7 @@ Defined in: [libraries/epub/src/index.tsx:480](https://gitlab.com/storyteller-pl
|
|
|
2294
2292
|
|
|
2295
2293
|
> `static` **create**(`path`, `dublinCore`, `additionalMetadata`): `Promise`\<[`Epub`](#epub)\>
|
|
2296
2294
|
|
|
2297
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2295
|
+
Defined in: [libraries/epub/src/index.tsx:427](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L427)
|
|
2298
2296
|
|
|
2299
2297
|
Construct a new EPUB on a writable backend, optionally seeded
|
|
2300
2298
|
with the provided metadata. Equivalent to
|
|
@@ -2316,7 +2314,7 @@ with the provided metadata. Equivalent to
|
|
|
2316
2314
|
|
|
2317
2315
|
> `static` **formatSmilDuration**(`duration`): `string`
|
|
2318
2316
|
|
|
2319
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2317
|
+
Defined in: [libraries/epub/src/index.tsx:358](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L358)
|
|
2320
2318
|
|
|
2321
2319
|
Format a duration, provided as a number of seconds, as
|
|
2322
2320
|
a SMIL clock value, to be used for Media Overlays.
|
|
@@ -2341,7 +2339,7 @@ https://www.w3.org/TR/epub-33/#sec-duration
|
|
|
2341
2339
|
|
|
2342
2340
|
> `static` **from**(`pathOrData`): `Promise`\<[`Epub`](#epub)\>
|
|
2343
2341
|
|
|
2344
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2342
|
+
Defined in: [libraries/epub/src/index.tsx:463](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L463)
|
|
2345
2343
|
|
|
2346
2344
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2347
2345
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2369,7 +2367,7 @@ when the archive is not a valid EPUB 3
|
|
|
2369
2367
|
|
|
2370
2368
|
> `static` **from**(`pathOrData`, `options`): `Promise`\<[`EpubReader`](#epubreader)\>
|
|
2371
2369
|
|
|
2372
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2370
|
+
Defined in: [libraries/epub/src/index.tsx:464](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L464)
|
|
2373
2371
|
|
|
2374
2372
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2375
2373
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2398,7 +2396,7 @@ when the archive is not a valid EPUB 3
|
|
|
2398
2396
|
|
|
2399
2397
|
> `static` **from**(`pathOrData`, `options?`): `Promise`\<[`Epub`](#epub) \| [`EpubReader`](#epubreader)\>
|
|
2400
2398
|
|
|
2401
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2399
|
+
Defined in: [libraries/epub/src/index.tsx:468](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L468)
|
|
2402
2400
|
|
|
2403
2401
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2404
2402
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2427,7 +2425,7 @@ when the archive is not a valid EPUB 3
|
|
|
2427
2425
|
|
|
2428
2426
|
> `static` **upgrade**(`path`, `options`): `Promise`\<[`Epub`](#epub)\>
|
|
2429
2427
|
|
|
2430
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2428
|
+
Defined in: [libraries/epub/src/index.tsx:3309](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3309)
|
|
2431
2429
|
|
|
2432
2430
|
Upgrade an EPUB 2 publication to EPUB 3 in place, returning a new,
|
|
2433
2431
|
valid Epub 3 instance. Equivalent to
|
|
@@ -2448,7 +2446,7 @@ valid Epub 3 instance. Equivalent to
|
|
|
2448
2446
|
|
|
2449
2447
|
> `static` **using**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
|
|
2450
2448
|
|
|
2451
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2449
|
+
Defined in: [libraries/epub/src/index.tsx:447](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L447)
|
|
2452
2450
|
|
|
2453
2451
|
Specify the storage backend to use for the EPUB
|
|
2454
2452
|
|
|
@@ -2482,7 +2480,7 @@ using reader = await Epub.using(MemoryAdapter).from(buffer, { cache: false });
|
|
|
2482
2480
|
|
|
2483
2481
|
## EpubFactory\<A\>
|
|
2484
2482
|
|
|
2485
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2483
|
+
Defined in: [libraries/epub/src/index.tsx:3338](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3338)
|
|
2486
2484
|
|
|
2487
2485
|
Adapter-bound factory returned by [Epub.using](#using).
|
|
2488
2486
|
|
|
@@ -2503,7 +2501,7 @@ gracefully when the adapter doesn't support the operation: `create` and
|
|
|
2503
2501
|
|
|
2504
2502
|
> **new EpubFactory**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
|
|
2505
2503
|
|
|
2506
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2504
|
+
Defined in: [libraries/epub/src/index.tsx:3339](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3339)
|
|
2507
2505
|
|
|
2508
2506
|
##### Parameters
|
|
2509
2507
|
|
|
@@ -2521,7 +2519,7 @@ Defined in: [libraries/epub/src/index.tsx:3340](https://gitlab.com/storyteller-p
|
|
|
2521
2519
|
|
|
2522
2520
|
> `readonly` **adapterClass**: `A`
|
|
2523
2521
|
|
|
2524
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2522
|
+
Defined in: [libraries/epub/src/index.tsx:3339](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3339)
|
|
2525
2523
|
|
|
2526
2524
|
### Methods
|
|
2527
2525
|
|
|
@@ -2529,7 +2527,7 @@ Defined in: [libraries/epub/src/index.tsx:3340](https://gitlab.com/storyteller-p
|
|
|
2529
2527
|
|
|
2530
2528
|
> **create**(`path`, `__namedParameters`, `additionalMetadata`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
|
|
2531
2529
|
|
|
2532
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2530
|
+
Defined in: [libraries/epub/src/index.tsx:3419](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3419)
|
|
2533
2531
|
|
|
2534
2532
|
Construct a new EPUB on this factory's adapter, optionally seeded
|
|
2535
2533
|
with the provided metadata. Requires a writable adapter that
|
|
@@ -2557,7 +2555,7 @@ when the adapter is read-only or does not implement initEmpty
|
|
|
2557
2555
|
|
|
2558
2556
|
> **from**(`source`, `options`): `Promise`\<`Pick`\<[`Epub`](#epub), `"storage"` \| `"getItemArchiveLength"` \| `"getRootfile"` \| `"getPackageDocumentSource"` \| `"getPackageElement"` \| `"getManifest"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"getMetadata"` \| `"getIdentifier"` \| `"getUniqueIdentifier"` \| `"getUniqueIdentifierId"` \| `"getIdentifiers"` \| `"getSources"` \| `"getPageBreakSource"` \| `"getCoverImageItem"` \| `"getCoverImage"` \| `"getPublicationDate"` \| `"getModifiedDate"` \| `"getLayout"` \| `"getBaseDirection"` \| `"getType"` \| `"getSubjects"` \| `"getLanguage"` \| `"getTitle"` \| `"getSubtitle"` \| `"getTitles"` \| `"getDescription"` \| `"getPackageVocabularyPrefixes"` \| `"getCollections"` \| `"getCreators"` \| `"getContributors"` \| `"getSpineItems"` \| `"getTableOfContents"` \| `"getLandmarks"` \| `"getPageList"` \| `"resolveHref"` \| `"readFileContents"` \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"getVersion"` \| `"getNcxTableOfContents"` \| `"getGuideEntries"` \| `"discardAndClose"`\> & `Disposable` & `object`\>
|
|
2559
2557
|
|
|
2560
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2558
|
+
Defined in: [libraries/epub/src/index.tsx:3346](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3346)
|
|
2561
2559
|
|
|
2562
2560
|
Open an existing EPUB through this factory's adapter
|
|
2563
2561
|
|
|
@@ -2580,7 +2578,7 @@ when the archive is not a valid EPUB 3
|
|
|
2580
2578
|
|
|
2581
2579
|
> **from**(`source`, `options?`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\> & `object`\>
|
|
2582
2580
|
|
|
2583
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2581
|
+
Defined in: [libraries/epub/src/index.tsx:3350](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3350)
|
|
2584
2582
|
|
|
2585
2583
|
Open an existing EPUB through this factory's adapter
|
|
2586
2584
|
|
|
@@ -2603,7 +2601,7 @@ when the archive is not a valid EPUB 3
|
|
|
2603
2601
|
|
|
2604
2602
|
> **readPackageDocumentSource**(`source`, `options`): `Promise`\<`string`\>
|
|
2605
2603
|
|
|
2606
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2604
|
+
Defined in: [libraries/epub/src/index.tsx:3393](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3393)
|
|
2607
2605
|
|
|
2608
2606
|
##### Parameters
|
|
2609
2607
|
|
|
@@ -2620,7 +2618,7 @@ Defined in: [libraries/epub/src/index.tsx:3394](https://gitlab.com/storyteller-p
|
|
|
2620
2618
|
|
|
2621
2619
|
> **upgrade**(`path`, `options`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
|
|
2622
2620
|
|
|
2623
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2621
|
+
Defined in: [libraries/epub/src/index.tsx:3546](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3546)
|
|
2624
2622
|
|
|
2625
2623
|
Upgrade an EPUB 2 publication to EPUB 3 in place using this
|
|
2626
2624
|
factory's adapter, returning a new, valid Epub 3 instance.
|
|
@@ -7979,3564 +7977,4 @@ Checks whether the DOM implementation implements a specific feature and its vers
|
|
|
7979
7977
|
| Parameter | Type | Description |
|
|
7980
7978
|
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
7981
7979
|
| `feature` | `string` | The package name of the feature to test. This is the same name that can be passed to the method `hasFeature` on `DOMImplementation`. |
|
|
7982
|
-
| `version` | `string` |
|
|
7983
|
-
|
|
7984
|
-
##### Returns
|
|
7985
|
-
|
|
7986
|
-
`true`
|
|
7987
|
-
|
|
7988
|
-
##### Deprecated
|
|
7989
|
-
|
|
7990
|
-
Since `DOMImplementation.hasFeature` is deprecated and always returns true.
|
|
7991
|
-
|
|
7992
|
-
##### Since
|
|
7993
|
-
|
|
7994
|
-
Introduced in DOM Level 2
|
|
7995
|
-
|
|
7996
|
-
##### See
|
|
7997
|
-
|
|
7998
|
-
DOMImplementation.hasFeature
|
|
7999
|
-
|
|
8000
|
-
##### Inherited from
|
|
8001
|
-
|
|
8002
|
-
`Node.isSupported`
|
|
8003
|
-
|
|
8004
|
-
#### lookupNamespaceURI()
|
|
8005
|
-
|
|
8006
|
-
> **lookupNamespaceURI**(`prefix`): `string` \| `null`
|
|
8007
|
-
|
|
8008
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:571
|
|
8009
|
-
|
|
8010
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupNamespaceURI)
|
|
8011
|
-
|
|
8012
|
-
##### Parameters
|
|
8013
|
-
|
|
8014
|
-
| Parameter | Type |
|
|
8015
|
-
| --------- | ------------------ |
|
|
8016
|
-
| `prefix` | `string` \| `null` |
|
|
8017
|
-
|
|
8018
|
-
##### Returns
|
|
8019
|
-
|
|
8020
|
-
`string` \| `null`
|
|
8021
|
-
|
|
8022
|
-
##### Inherited from
|
|
8023
|
-
|
|
8024
|
-
`Node.lookupNamespaceURI`
|
|
8025
|
-
|
|
8026
|
-
#### lookupPrefix()
|
|
8027
|
-
|
|
8028
|
-
> **lookupPrefix**(`namespace`): `string` \| `null`
|
|
8029
|
-
|
|
8030
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:574
|
|
8031
|
-
|
|
8032
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupPrefix)
|
|
8033
|
-
|
|
8034
|
-
##### Parameters
|
|
8035
|
-
|
|
8036
|
-
| Parameter | Type |
|
|
8037
|
-
| ----------- | ------------------ |
|
|
8038
|
-
| `namespace` | `string` \| `null` |
|
|
8039
|
-
|
|
8040
|
-
##### Returns
|
|
8041
|
-
|
|
8042
|
-
`string` \| `null`
|
|
8043
|
-
|
|
8044
|
-
##### Inherited from
|
|
8045
|
-
|
|
8046
|
-
`Node.lookupPrefix`
|
|
8047
|
-
|
|
8048
|
-
#### normalize()
|
|
8049
|
-
|
|
8050
|
-
> **normalize**(): `void`
|
|
8051
|
-
|
|
8052
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:582
|
|
8053
|
-
|
|
8054
|
-
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous
|
|
8055
|
-
exclusive Text nodes into the first of their nodes.
|
|
8056
|
-
|
|
8057
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/normalize)
|
|
8058
|
-
|
|
8059
|
-
##### Returns
|
|
8060
|
-
|
|
8061
|
-
`void`
|
|
8062
|
-
|
|
8063
|
-
##### Inherited from
|
|
8064
|
-
|
|
8065
|
-
`Node.normalize`
|
|
8066
|
-
|
|
8067
|
-
#### removeAttribute()
|
|
8068
|
-
|
|
8069
|
-
> **removeAttribute**(`qualifiedName`): `void`
|
|
8070
|
-
|
|
8071
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:969
|
|
8072
|
-
|
|
8073
|
-
Removes element's first attribute whose qualified name is qualifiedName.
|
|
8074
|
-
|
|
8075
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttribute)
|
|
8076
|
-
|
|
8077
|
-
##### Parameters
|
|
8078
|
-
|
|
8079
|
-
| Parameter | Type |
|
|
8080
|
-
| --------------- | -------- |
|
|
8081
|
-
| `qualifiedName` | `string` |
|
|
8082
|
-
|
|
8083
|
-
##### Returns
|
|
8084
|
-
|
|
8085
|
-
`void`
|
|
8086
|
-
|
|
8087
|
-
#### removeAttributeNode()
|
|
8088
|
-
|
|
8089
|
-
> **removeAttributeNode**(`attr`): [`Attr`](#attr-1)
|
|
8090
|
-
|
|
8091
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:977
|
|
8092
|
-
|
|
8093
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNode)
|
|
8094
|
-
|
|
8095
|
-
##### Parameters
|
|
8096
|
-
|
|
8097
|
-
| Parameter | Type |
|
|
8098
|
-
| --------- | ----------------- |
|
|
8099
|
-
| `attr` | [`Attr`](#attr-1) |
|
|
8100
|
-
|
|
8101
|
-
##### Returns
|
|
8102
|
-
|
|
8103
|
-
[`Attr`](#attr-1)
|
|
8104
|
-
|
|
8105
|
-
#### removeAttributeNS()
|
|
8106
|
-
|
|
8107
|
-
> **removeAttributeNS**(`namespace`, `localName`): `void`
|
|
8108
|
-
|
|
8109
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:975
|
|
8110
|
-
|
|
8111
|
-
Removes element's attribute whose namespace is namespace and local name is localName.
|
|
8112
|
-
|
|
8113
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNS)
|
|
8114
|
-
|
|
8115
|
-
##### Parameters
|
|
8116
|
-
|
|
8117
|
-
| Parameter | Type |
|
|
8118
|
-
| ----------- | ------------------ |
|
|
8119
|
-
| `namespace` | `string` \| `null` |
|
|
8120
|
-
| `localName` | `string` |
|
|
8121
|
-
|
|
8122
|
-
##### Returns
|
|
8123
|
-
|
|
8124
|
-
`void`
|
|
8125
|
-
|
|
8126
|
-
#### removeChild()
|
|
8127
|
-
|
|
8128
|
-
> **removeChild**(`child`): [`Node`](#node-1)
|
|
8129
|
-
|
|
8130
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:585
|
|
8131
|
-
|
|
8132
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/removeChild)
|
|
8133
|
-
|
|
8134
|
-
##### Parameters
|
|
8135
|
-
|
|
8136
|
-
| Parameter | Type |
|
|
8137
|
-
| --------- | ----------------- |
|
|
8138
|
-
| `child` | [`Node`](#node-1) |
|
|
8139
|
-
|
|
8140
|
-
##### Returns
|
|
8141
|
-
|
|
8142
|
-
[`Node`](#node-1)
|
|
8143
|
-
|
|
8144
|
-
##### Inherited from
|
|
8145
|
-
|
|
8146
|
-
`Node.removeChild`
|
|
8147
|
-
|
|
8148
|
-
#### replaceChild()
|
|
8149
|
-
|
|
8150
|
-
> **replaceChild**(`node`, `child`): [`Node`](#node-1)
|
|
8151
|
-
|
|
8152
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:588
|
|
8153
|
-
|
|
8154
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/replaceChild)
|
|
8155
|
-
|
|
8156
|
-
##### Parameters
|
|
8157
|
-
|
|
8158
|
-
| Parameter | Type |
|
|
8159
|
-
| --------- | ----------------- |
|
|
8160
|
-
| `node` | [`Node`](#node-1) |
|
|
8161
|
-
| `child` | [`Node`](#node-1) |
|
|
8162
|
-
|
|
8163
|
-
##### Returns
|
|
8164
|
-
|
|
8165
|
-
[`Node`](#node-1)
|
|
8166
|
-
|
|
8167
|
-
##### Inherited from
|
|
8168
|
-
|
|
8169
|
-
`Node.replaceChild`
|
|
8170
|
-
|
|
8171
|
-
#### setAttribute()
|
|
8172
|
-
|
|
8173
|
-
> **setAttribute**(`qualifiedName`, `value`): `void`
|
|
8174
|
-
|
|
8175
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:983
|
|
8176
|
-
|
|
8177
|
-
Sets the value of element's first attribute whose qualified name is qualifiedName to value.
|
|
8178
|
-
|
|
8179
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttribute)
|
|
8180
|
-
|
|
8181
|
-
##### Parameters
|
|
8182
|
-
|
|
8183
|
-
| Parameter | Type |
|
|
8184
|
-
| --------------- | -------- |
|
|
8185
|
-
| `qualifiedName` | `string` |
|
|
8186
|
-
| `value` | `string` |
|
|
8187
|
-
|
|
8188
|
-
##### Returns
|
|
8189
|
-
|
|
8190
|
-
`void`
|
|
8191
|
-
|
|
8192
|
-
#### setAttributeNode()
|
|
8193
|
-
|
|
8194
|
-
> **setAttributeNode**(`attr`): [`Attr`](#attr-1) \| `null`
|
|
8195
|
-
|
|
8196
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:996
|
|
8197
|
-
|
|
8198
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNode)
|
|
8199
|
-
|
|
8200
|
-
##### Parameters
|
|
8201
|
-
|
|
8202
|
-
| Parameter | Type |
|
|
8203
|
-
| --------- | ----------------- |
|
|
8204
|
-
| `attr` | [`Attr`](#attr-1) |
|
|
8205
|
-
|
|
8206
|
-
##### Returns
|
|
8207
|
-
|
|
8208
|
-
[`Attr`](#attr-1) \| `null`
|
|
8209
|
-
|
|
8210
|
-
#### setAttributeNodeNS()
|
|
8211
|
-
|
|
8212
|
-
> **setAttributeNodeNS**(`attr`): [`Attr`](#attr-1) \| `null`
|
|
8213
|
-
|
|
8214
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:998
|
|
8215
|
-
|
|
8216
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)
|
|
8217
|
-
|
|
8218
|
-
##### Parameters
|
|
8219
|
-
|
|
8220
|
-
| Parameter | Type |
|
|
8221
|
-
| --------- | ----------------- |
|
|
8222
|
-
| `attr` | [`Attr`](#attr-1) |
|
|
8223
|
-
|
|
8224
|
-
##### Returns
|
|
8225
|
-
|
|
8226
|
-
[`Attr`](#attr-1) \| `null`
|
|
8227
|
-
|
|
8228
|
-
#### setAttributeNS()
|
|
8229
|
-
|
|
8230
|
-
> **setAttributeNS**(`namespace`, `qualifiedName`, `value`): `void`
|
|
8231
|
-
|
|
8232
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:990
|
|
8233
|
-
|
|
8234
|
-
Sets the value of element's attribute whose namespace is namespace and local name is
|
|
8235
|
-
localName to value.
|
|
8236
|
-
|
|
8237
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNS)
|
|
8238
|
-
|
|
8239
|
-
##### Parameters
|
|
8240
|
-
|
|
8241
|
-
| Parameter | Type |
|
|
8242
|
-
| --------------- | ------------------ |
|
|
8243
|
-
| `namespace` | `string` \| `null` |
|
|
8244
|
-
| `qualifiedName` | `string` |
|
|
8245
|
-
| `value` | `string` |
|
|
8246
|
-
|
|
8247
|
-
##### Returns
|
|
8248
|
-
|
|
8249
|
-
`void`
|
|
8250
|
-
|
|
8251
|
-
---
|
|
8252
|
-
|
|
8253
|
-
## Epub2UpgradeOptions
|
|
8254
|
-
|
|
8255
|
-
Defined in: [libraries/epub/src/upgrade.tsx:76](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L76)
|
|
8256
|
-
|
|
8257
|
-
### Properties
|
|
8258
|
-
|
|
8259
|
-
#### outputPath?
|
|
8260
|
-
|
|
8261
|
-
> `optional` **outputPath**: `string`
|
|
8262
|
-
|
|
8263
|
-
Defined in: [libraries/epub/src/upgrade.tsx:80](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L80)
|
|
8264
|
-
|
|
8265
|
-
The path to the output file. If provided, the input file will be copied to the output path.
|
|
8266
|
-
|
|
8267
|
-
#### removeNcx?
|
|
8268
|
-
|
|
8269
|
-
> `optional` **removeNcx**: `boolean`
|
|
8270
|
-
|
|
8271
|
-
Defined in: [libraries/epub/src/upgrade.tsx:84](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L84)
|
|
8272
|
-
|
|
8273
|
-
Whether to remove the NCX file, as it's technically optional in EPUB 3.
|
|
8274
|
-
|
|
8275
|
-
---
|
|
8276
|
-
|
|
8277
|
-
## EpubIdentifier
|
|
8278
|
-
|
|
8279
|
-
Defined in: [libraries/epub/src/index.tsx:132](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L132)
|
|
8280
|
-
|
|
8281
|
-
### Properties
|
|
8282
|
-
|
|
8283
|
-
#### id?
|
|
8284
|
-
|
|
8285
|
-
> `optional` **id**: `string`
|
|
8286
|
-
|
|
8287
|
-
Defined in: [libraries/epub/src/index.tsx:134](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L134)
|
|
8288
|
-
|
|
8289
|
-
#### identifierType?
|
|
8290
|
-
|
|
8291
|
-
> `optional` **identifierType**: `string`
|
|
8292
|
-
|
|
8293
|
-
Defined in: [libraries/epub/src/index.tsx:136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L136)
|
|
8294
|
-
|
|
8295
|
-
the value of a refining `identifier-type` meta, if present
|
|
8296
|
-
|
|
8297
|
-
#### scheme?
|
|
8298
|
-
|
|
8299
|
-
> `optional` **scheme**: `string`
|
|
8300
|
-
|
|
8301
|
-
Defined in: [libraries/epub/src/index.tsx:138](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L138)
|
|
8302
|
-
|
|
8303
|
-
the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
|
|
8304
|
-
|
|
8305
|
-
#### value
|
|
8306
|
-
|
|
8307
|
-
> **value**: `string`
|
|
8308
|
-
|
|
8309
|
-
Defined in: [libraries/epub/src/index.tsx:133](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L133)
|
|
8310
|
-
|
|
8311
|
-
---
|
|
8312
|
-
|
|
8313
|
-
## EpubListEntry
|
|
8314
|
-
|
|
8315
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:39](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L39)
|
|
8316
|
-
|
|
8317
|
-
### Properties
|
|
8318
|
-
|
|
8319
|
-
#### absolutePath
|
|
8320
|
-
|
|
8321
|
-
> **absolutePath**: `string`
|
|
8322
|
-
|
|
8323
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:41](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L41)
|
|
8324
|
-
|
|
8325
|
-
location the adapter can read the entry back from, in whatever form it stores
|
|
8326
|
-
|
|
8327
|
-
#### relativePath
|
|
8328
|
-
|
|
8329
|
-
> **relativePath**: `string`
|
|
8330
|
-
|
|
8331
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:43](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L43)
|
|
8332
|
-
|
|
8333
|
-
the entry name, as it appears in the archive
|
|
8334
|
-
|
|
8335
|
-
---
|
|
8336
|
-
|
|
8337
|
-
## EpubSource
|
|
8338
|
-
|
|
8339
|
-
Defined in: [libraries/epub/src/index.tsx:141](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L141)
|
|
8340
|
-
|
|
8341
|
-
### Properties
|
|
8342
|
-
|
|
8343
|
-
#### id?
|
|
8344
|
-
|
|
8345
|
-
> `optional` **id**: `string`
|
|
8346
|
-
|
|
8347
|
-
Defined in: [libraries/epub/src/index.tsx:143](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L143)
|
|
8348
|
-
|
|
8349
|
-
#### identifierType?
|
|
8350
|
-
|
|
8351
|
-
> `optional` **identifierType**: `string`
|
|
8352
|
-
|
|
8353
|
-
Defined in: [libraries/epub/src/index.tsx:145](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L145)
|
|
8354
|
-
|
|
8355
|
-
the value of a refining `identifier-type` meta, if present
|
|
8356
|
-
|
|
8357
|
-
#### isPageBreakSource?
|
|
8358
|
-
|
|
8359
|
-
> `optional` **isPageBreakSource**: `boolean`
|
|
8360
|
-
|
|
8361
|
-
Defined in: [libraries/epub/src/index.tsx:156](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L156)
|
|
8362
|
-
|
|
8363
|
-
whether this source has a `source-of="pagination"` refinement
|
|
8364
|
-
or of a `<meta property="pageBreakSource">` element
|
|
8365
|
-
|
|
8366
|
-
as of EPUB 3.4 `source-of` is advised-deprecated in favour of the
|
|
8367
|
-
publication-level `pageBreakSource` property. if you want to
|
|
8368
|
-
be sure to get the source of pagination, use [Epub.getPageBreakSource](#getpagebreaksource)
|
|
8369
|
-
|
|
8370
|
-
#### scheme?
|
|
8371
|
-
|
|
8372
|
-
> `optional` **scheme**: `string`
|
|
8373
|
-
|
|
8374
|
-
Defined in: [libraries/epub/src/index.tsx:147](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L147)
|
|
8375
|
-
|
|
8376
|
-
the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
|
|
8377
|
-
|
|
8378
|
-
#### value
|
|
8379
|
-
|
|
8380
|
-
> **value**: `string`
|
|
8381
|
-
|
|
8382
|
-
Defined in: [libraries/epub/src/index.tsx:142](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L142)
|
|
8383
|
-
|
|
8384
|
-
---
|
|
8385
|
-
|
|
8386
|
-
## EpubStorageAdapter
|
|
8387
|
-
|
|
8388
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:56](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L56)
|
|
8389
|
-
|
|
8390
|
-
Adapters only receive entry names, which is:
|
|
8391
|
-
|
|
8392
|
-
- the name a file has in the archive itself
|
|
8393
|
-
- relative to the container root, slash-separated,
|
|
8394
|
-
- already percent-decoded (eg `OEBPS/a b.xhtml`, not `OEBPS/a%20b.xhtml`)
|
|
8395
|
-
|
|
8396
|
-
Adapter decides where to store files under what name
|
|
8397
|
-
In previous versions of the EPUB lib, this was a little bit more muddled, leading to
|
|
8398
|
-
eg the TmpFsAdapter trying to read `OEBPS/a%20b.xhtml`, whereas it was stored as `OEBPS/a b.xhtml`
|
|
8399
|
-
|
|
8400
|
-
### Methods
|
|
8401
|
-
|
|
8402
|
-
#### archiveLength()
|
|
8403
|
-
|
|
8404
|
-
> **archiveLength**(`entry`): `Promise`\<`number`\>
|
|
8405
|
-
|
|
8406
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:71](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L71)
|
|
8407
|
-
|
|
8408
|
-
Length of an entry in bytes, for the readium page-count heuristic
|
|
8409
|
-
which expects compressed size when available
|
|
8410
|
-
|
|
8411
|
-
##### Parameters
|
|
8412
|
-
|
|
8413
|
-
| Parameter | Type |
|
|
8414
|
-
| --------- | -------- |
|
|
8415
|
-
| `entry` | `string` |
|
|
8416
|
-
|
|
8417
|
-
##### Returns
|
|
8418
|
-
|
|
8419
|
-
`Promise`\<`number`\>
|
|
8420
|
-
|
|
8421
|
-
#### dispose()
|
|
8422
|
-
|
|
8423
|
-
> **dispose**(): `void` \| `Promise`\<`void`\>
|
|
8424
|
-
|
|
8425
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:90](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L90)
|
|
8426
|
-
|
|
8427
|
-
Always called on close or error
|
|
8428
|
-
|
|
8429
|
-
##### Returns
|
|
8430
|
-
|
|
8431
|
-
`void` \| `Promise`\<`void`\>
|
|
8432
|
-
|
|
8433
|
-
#### duplicate()?
|
|
8434
|
-
|
|
8435
|
-
> `optional` **duplicate**(): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8436
|
-
|
|
8437
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:84](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L84)
|
|
8438
|
-
|
|
8439
|
-
Required for Epub.copy
|
|
8440
|
-
|
|
8441
|
-
##### Returns
|
|
8442
|
-
|
|
8443
|
-
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8444
|
-
|
|
8445
|
-
#### exists()
|
|
8446
|
-
|
|
8447
|
-
> **exists**(`entry`): `Promise`\<`boolean`\>
|
|
8448
|
-
|
|
8449
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:65](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L65)
|
|
8450
|
-
|
|
8451
|
-
Whether the archive holds an entry under exactly this name.
|
|
8452
|
-
Used to choose between different canditates for an href
|
|
8453
|
-
so should be exact
|
|
8454
|
-
|
|
8455
|
-
##### Parameters
|
|
8456
|
-
|
|
8457
|
-
| Parameter | Type |
|
|
8458
|
-
| --------- | -------- |
|
|
8459
|
-
| `entry` | `string` |
|
|
8460
|
-
|
|
8461
|
-
##### Returns
|
|
8462
|
-
|
|
8463
|
-
`Promise`\<`boolean`\>
|
|
8464
|
-
|
|
8465
|
-
#### list()?
|
|
8466
|
-
|
|
8467
|
-
> `optional` **list**(): `AsyncIterable`\<[`EpubListEntry`](#epublistentry)\>
|
|
8468
|
-
|
|
8469
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:81](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L81)
|
|
8470
|
-
|
|
8471
|
-
Required for Epub.saveAndClose to walk the contents
|
|
8472
|
-
|
|
8473
|
-
##### Returns
|
|
8474
|
-
|
|
8475
|
-
`AsyncIterable`\<[`EpubListEntry`](#epublistentry)\>
|
|
8476
|
-
|
|
8477
|
-
#### read()
|
|
8478
|
-
|
|
8479
|
-
##### Call Signature
|
|
8480
|
-
|
|
8481
|
-
> **read**(`entry`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
8482
|
-
|
|
8483
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:57](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L57)
|
|
8484
|
-
|
|
8485
|
-
###### Parameters
|
|
8486
|
-
|
|
8487
|
-
| Parameter | Type |
|
|
8488
|
-
| --------- | -------- |
|
|
8489
|
-
| `entry` | `string` |
|
|
8490
|
-
|
|
8491
|
-
###### Returns
|
|
8492
|
-
|
|
8493
|
-
`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
8494
|
-
|
|
8495
|
-
##### Call Signature
|
|
8496
|
-
|
|
8497
|
-
> **read**(`entry`, `encoding`): `Promise`\<`string`\>
|
|
8498
|
-
|
|
8499
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:58](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L58)
|
|
8500
|
-
|
|
8501
|
-
###### Parameters
|
|
8502
|
-
|
|
8503
|
-
| Parameter | Type |
|
|
8504
|
-
| ---------- | --------- |
|
|
8505
|
-
| `entry` | `string` |
|
|
8506
|
-
| `encoding` | `"utf-8"` |
|
|
8507
|
-
|
|
8508
|
-
###### Returns
|
|
8509
|
-
|
|
8510
|
-
`Promise`\<`string`\>
|
|
8511
|
-
|
|
8512
|
-
#### remove()?
|
|
8513
|
-
|
|
8514
|
-
> `optional` **remove**(`entry`): `Promise`\<`void`\>
|
|
8515
|
-
|
|
8516
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:78](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L78)
|
|
8517
|
-
|
|
8518
|
-
Required for removeManifestItem / setCoverImage replacement
|
|
8519
|
-
|
|
8520
|
-
##### Parameters
|
|
8521
|
-
|
|
8522
|
-
| Parameter | Type |
|
|
8523
|
-
| --------- | -------- |
|
|
8524
|
-
| `entry` | `string` |
|
|
8525
|
-
|
|
8526
|
-
##### Returns
|
|
8527
|
-
|
|
8528
|
-
`Promise`\<`void`\>
|
|
8529
|
-
|
|
8530
|
-
#### serialize()?
|
|
8531
|
-
|
|
8532
|
-
> `optional` **serialize**(`targetPath`): `Promise`\<`void`\>
|
|
8533
|
-
|
|
8534
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:87](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L87)
|
|
8535
|
-
|
|
8536
|
-
Required for Epub.saveAndClose
|
|
8537
|
-
|
|
8538
|
-
##### Parameters
|
|
8539
|
-
|
|
8540
|
-
| Parameter | Type |
|
|
8541
|
-
| ------------ | -------- |
|
|
8542
|
-
| `targetPath` | `string` |
|
|
8543
|
-
|
|
8544
|
-
##### Returns
|
|
8545
|
-
|
|
8546
|
-
`Promise`\<`void`\>
|
|
8547
|
-
|
|
8548
|
-
#### write()?
|
|
8549
|
-
|
|
8550
|
-
##### Call Signature
|
|
8551
|
-
|
|
8552
|
-
> `optional` **write**(`entry`, `data`): `Promise`\<`void`\>
|
|
8553
|
-
|
|
8554
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:74](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L74)
|
|
8555
|
-
|
|
8556
|
-
Required for any mutation method on Epub
|
|
8557
|
-
|
|
8558
|
-
###### Parameters
|
|
8559
|
-
|
|
8560
|
-
| Parameter | Type |
|
|
8561
|
-
| --------- | ------------ |
|
|
8562
|
-
| `entry` | `string` |
|
|
8563
|
-
| `data` | `Uint8Array` |
|
|
8564
|
-
|
|
8565
|
-
###### Returns
|
|
8566
|
-
|
|
8567
|
-
`Promise`\<`void`\>
|
|
8568
|
-
|
|
8569
|
-
##### Call Signature
|
|
8570
|
-
|
|
8571
|
-
> `optional` **write**(`entry`, `data`, `encoding`): `Promise`\<`void`\>
|
|
8572
|
-
|
|
8573
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:75](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L75)
|
|
8574
|
-
|
|
8575
|
-
###### Parameters
|
|
8576
|
-
|
|
8577
|
-
| Parameter | Type |
|
|
8578
|
-
| ---------- | --------- |
|
|
8579
|
-
| `entry` | `string` |
|
|
8580
|
-
| `data` | `string` |
|
|
8581
|
-
| `encoding` | `"utf-8"` |
|
|
8582
|
-
|
|
8583
|
-
###### Returns
|
|
8584
|
-
|
|
8585
|
-
`Promise`\<`void`\>
|
|
8586
|
-
|
|
8587
|
-
---
|
|
8588
|
-
|
|
8589
|
-
## EpubStorageAdapterClass\<Opts\>
|
|
8590
|
-
|
|
8591
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:93](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L93)
|
|
8592
|
-
|
|
8593
|
-
### Type Parameters
|
|
8594
|
-
|
|
8595
|
-
| Type Parameter | Default type |
|
|
8596
|
-
| ------------------------- | ------------ |
|
|
8597
|
-
| `Opts` _extends_ `object` | `object` |
|
|
8598
|
-
|
|
8599
|
-
### Properties
|
|
8600
|
-
|
|
8601
|
-
#### capabilities
|
|
8602
|
-
|
|
8603
|
-
> `readonly` **capabilities**: [`EpubStorageCapabilities`](#epubstoragecapabilities)
|
|
8604
|
-
|
|
8605
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:95](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L95)
|
|
8606
|
-
|
|
8607
|
-
#### kind
|
|
8608
|
-
|
|
8609
|
-
> `readonly` **kind**: [`EpubStorageKind`](#epubstoragekind)
|
|
8610
|
-
|
|
8611
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:94](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L94)
|
|
8612
|
-
|
|
8613
|
-
### Methods
|
|
8614
|
-
|
|
8615
|
-
#### init()
|
|
8616
|
-
|
|
8617
|
-
> **init**(`source`, `opts?`): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8618
|
-
|
|
8619
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L101)
|
|
8620
|
-
|
|
8621
|
-
Open an archive from a path or buffer.
|
|
8622
|
-
Will throw if the archive is not a valid EPUB 3
|
|
8623
|
-
|
|
8624
|
-
##### Parameters
|
|
8625
|
-
|
|
8626
|
-
| Parameter | Type |
|
|
8627
|
-
| --------- | --------------------------------- |
|
|
8628
|
-
| `source` | [`ArchiveSource`](#archivesource) |
|
|
8629
|
-
| `opts?` | `Opts` |
|
|
8630
|
-
|
|
8631
|
-
##### Returns
|
|
8632
|
-
|
|
8633
|
-
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8634
|
-
|
|
8635
|
-
#### initEmpty()?
|
|
8636
|
-
|
|
8637
|
-
> `optional` **initEmpty**(`opts?`): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8638
|
-
|
|
8639
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:107](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L107)
|
|
8640
|
-
|
|
8641
|
-
Initialize an empty extract root for [Epub.create](#create).
|
|
8642
|
-
Only necessary for adapters that can write
|
|
8643
|
-
|
|
8644
|
-
##### Parameters
|
|
8645
|
-
|
|
8646
|
-
| Parameter | Type |
|
|
8647
|
-
| --------- | ------ |
|
|
8648
|
-
| `opts?` | `Opts` |
|
|
8649
|
-
|
|
8650
|
-
##### Returns
|
|
8651
|
-
|
|
8652
|
-
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8653
|
-
|
|
8654
|
-
---
|
|
8655
|
-
|
|
8656
|
-
## EpubStorageCapabilities
|
|
8657
|
-
|
|
8658
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:34](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L34)
|
|
8659
|
-
|
|
8660
|
-
### Properties
|
|
8661
|
-
|
|
8662
|
-
#### writable
|
|
8663
|
-
|
|
8664
|
-
> `readonly` **writable**: `boolean`
|
|
8665
|
-
|
|
8666
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:36](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L36)
|
|
8667
|
-
|
|
8668
|
-
when false, the Epub class refuses every mutation method at runtime
|
|
8669
|
-
|
|
8670
|
-
---
|
|
8671
|
-
|
|
8672
|
-
## FromOptions
|
|
8673
|
-
|
|
8674
|
-
Defined in: [libraries/epub/src/index.tsx:210](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L210)
|
|
8675
|
-
|
|
8676
|
-
### Properties
|
|
8677
|
-
|
|
8678
|
-
#### readonly?
|
|
8679
|
-
|
|
8680
|
-
> `optional` **readonly**: `boolean`
|
|
8681
|
-
|
|
8682
|
-
Defined in: [libraries/epub/src/index.tsx:215](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L215)
|
|
8683
|
-
|
|
8684
|
-
when true, mutation methods throw [EpubReadOnlyError](#epubreadonlyerror) at runtime
|
|
8685
|
-
|
|
8686
|
-
##### Default
|
|
8687
|
-
|
|
8688
|
-
```ts
|
|
8689
|
-
false;
|
|
8690
|
-
```
|
|
8691
|
-
|
|
8692
|
-
---
|
|
8693
|
-
|
|
8694
|
-
## GuideItem
|
|
8695
|
-
|
|
8696
|
-
Defined in: [libraries/epub/src/index.tsx:204](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L204)
|
|
8697
|
-
|
|
8698
|
-
### Properties
|
|
8699
|
-
|
|
8700
|
-
#### href
|
|
8701
|
-
|
|
8702
|
-
> **href**: `string`
|
|
8703
|
-
|
|
8704
|
-
Defined in: [libraries/epub/src/index.tsx:205](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L205)
|
|
8705
|
-
|
|
8706
|
-
#### title
|
|
8707
|
-
|
|
8708
|
-
> **title**: `string`
|
|
8709
|
-
|
|
8710
|
-
Defined in: [libraries/epub/src/index.tsx:206](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L206)
|
|
8711
|
-
|
|
8712
|
-
#### type
|
|
8713
|
-
|
|
8714
|
-
> **type**: `string`
|
|
8715
|
-
|
|
8716
|
-
Defined in: [libraries/epub/src/index.tsx:207](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L207)
|
|
8717
|
-
|
|
8718
|
-
---
|
|
8719
|
-
|
|
8720
|
-
## Landmark
|
|
8721
|
-
|
|
8722
|
-
Defined in: [libraries/epub/src/upgrade.tsx:70](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L70)
|
|
8723
|
-
|
|
8724
|
-
### Properties
|
|
8725
|
-
|
|
8726
|
-
#### href
|
|
8727
|
-
|
|
8728
|
-
> **href**: `string`
|
|
8729
|
-
|
|
8730
|
-
Defined in: [libraries/epub/src/upgrade.tsx:71](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L71)
|
|
8731
|
-
|
|
8732
|
-
#### title
|
|
8733
|
-
|
|
8734
|
-
> **title**: `string`
|
|
8735
|
-
|
|
8736
|
-
Defined in: [libraries/epub/src/upgrade.tsx:72](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L72)
|
|
8737
|
-
|
|
8738
|
-
#### type
|
|
8739
|
-
|
|
8740
|
-
> **type**: `string`
|
|
8741
|
-
|
|
8742
|
-
Defined in: [libraries/epub/src/upgrade.tsx:73](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L73)
|
|
8743
|
-
|
|
8744
|
-
---
|
|
8745
|
-
|
|
8746
|
-
## MemoryAdapterOptions
|
|
8747
|
-
|
|
8748
|
-
Defined in: [libraries/epub/src/adapters/memory.ts:13](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/memory.ts#L13)
|
|
8749
|
-
|
|
8750
|
-
### Properties
|
|
8751
|
-
|
|
8752
|
-
#### cache?
|
|
8753
|
-
|
|
8754
|
-
> `optional` **cache**: `boolean`
|
|
8755
|
-
|
|
8756
|
-
Defined in: [libraries/epub/src/adapters/memory.ts:20](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/memory.ts#L20)
|
|
8757
|
-
|
|
8758
|
-
per-entry decompressed buffer cache
|
|
8759
|
-
turn it off when opening many EPUBs and reading each entry at most once
|
|
8760
|
-
keeps resident size bounded by the entry index, not the decompressed payload sum
|
|
8761
|
-
|
|
8762
|
-
##### Default
|
|
8763
|
-
|
|
8764
|
-
```ts
|
|
8765
|
-
true;
|
|
8766
|
-
```
|
|
8767
|
-
|
|
8768
|
-
#### signal?
|
|
8769
|
-
|
|
8770
|
-
> `optional` **signal**: `AbortSignal`
|
|
8771
|
-
|
|
8772
|
-
Defined in: [libraries/epub/src/adapters/memory.ts:21](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/memory.ts#L21)
|
|
8773
|
-
|
|
8774
|
-
---
|
|
8775
|
-
|
|
8776
|
-
## Navigation
|
|
8777
|
-
|
|
8778
|
-
Defined in: [libraries/epub/src/index.tsx:198](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L198)
|
|
8779
|
-
|
|
8780
|
-
### Properties
|
|
8781
|
-
|
|
8782
|
-
#### children
|
|
8783
|
-
|
|
8784
|
-
> **children**: [`NavigationList`](#navigationlist)
|
|
8785
|
-
|
|
8786
|
-
Defined in: [libraries/epub/src/index.tsx:201](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L201)
|
|
8787
|
-
|
|
8788
|
-
#### role
|
|
8789
|
-
|
|
8790
|
-
> **role**: `string`
|
|
8791
|
-
|
|
8792
|
-
Defined in: [libraries/epub/src/index.tsx:200](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L200)
|
|
8793
|
-
|
|
8794
|
-
#### title?
|
|
8795
|
-
|
|
8796
|
-
> `optional` **title**: `string`
|
|
8797
|
-
|
|
8798
|
-
Defined in: [libraries/epub/src/index.tsx:199](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L199)
|
|
8799
|
-
|
|
8800
|
-
---
|
|
8801
|
-
|
|
8802
|
-
## NavigationItem
|
|
8803
|
-
|
|
8804
|
-
Defined in: [libraries/epub/src/index.tsx:189](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L189)
|
|
8805
|
-
|
|
8806
|
-
### Properties
|
|
8807
|
-
|
|
8808
|
-
#### children?
|
|
8809
|
-
|
|
8810
|
-
> `optional` **children**: [`NavigationList`](#navigationlist)
|
|
8811
|
-
|
|
8812
|
-
Defined in: [libraries/epub/src/index.tsx:193](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L193)
|
|
8813
|
-
|
|
8814
|
-
#### href?
|
|
8815
|
-
|
|
8816
|
-
> `optional` **href**: `string`
|
|
8817
|
-
|
|
8818
|
-
Defined in: [libraries/epub/src/index.tsx:191](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L191)
|
|
8819
|
-
|
|
8820
|
-
#### role?
|
|
8821
|
-
|
|
8822
|
-
> `optional` **role**: `string`
|
|
8823
|
-
|
|
8824
|
-
Defined in: [libraries/epub/src/index.tsx:192](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L192)
|
|
8825
|
-
|
|
8826
|
-
#### title
|
|
8827
|
-
|
|
8828
|
-
> **title**: `string`
|
|
8829
|
-
|
|
8830
|
-
Defined in: [libraries/epub/src/index.tsx:190](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L190)
|
|
8831
|
-
|
|
8832
|
-
---
|
|
8833
|
-
|
|
8834
|
-
## Node
|
|
8835
|
-
|
|
8836
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:368
|
|
8837
|
-
|
|
8838
|
-
The DOM Node interface is an abstract base class upon which many other DOM API objects are
|
|
8839
|
-
based, thus letting those object types to be used similarly and often interchangeably. As an
|
|
8840
|
-
abstract class, there is no such thing as a plain Node object. All objects that implement
|
|
8841
|
-
Node functionality are based on one of its subclasses. Most notable are Document, Element,
|
|
8842
|
-
and DocumentFragment.
|
|
8843
|
-
|
|
8844
|
-
In addition, every kind of DOM node is represented by an interface based on Node. These
|
|
8845
|
-
include Attr, CharacterData (which Text, Comment, CDATASection and ProcessingInstruction are
|
|
8846
|
-
all based on), and DocumentType.
|
|
8847
|
-
|
|
8848
|
-
In some cases, a particular feature of the base Node interface may not apply to one of its
|
|
8849
|
-
child interfaces; in that case, the inheriting node may return null or throw an exception,
|
|
8850
|
-
depending on circumstances. For example, attempting to add children to a node type that
|
|
8851
|
-
cannot have children will throw an exception.
|
|
8852
|
-
|
|
8853
|
-
**This behavior is slightly different from the in the specs**:
|
|
8854
|
-
|
|
8855
|
-
- unimplemented interfaces: EventTarget
|
|
8856
|
-
|
|
8857
|
-
### See
|
|
8858
|
-
|
|
8859
|
-
- http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
|
|
8860
|
-
- https://dom.spec.whatwg.org/#node
|
|
8861
|
-
|
|
8862
|
-
### Prettierignore
|
|
8863
|
-
|
|
8864
|
-
### Properties
|
|
8865
|
-
|
|
8866
|
-
#### ATTRIBUTE_NODE
|
|
8867
|
-
|
|
8868
|
-
> `readonly` **ATTRIBUTE_NODE**: `2`
|
|
8869
|
-
|
|
8870
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:592
|
|
8871
|
-
|
|
8872
|
-
#### baseURI
|
|
8873
|
-
|
|
8874
|
-
> `readonly` **baseURI**: `"about:blank"`
|
|
8875
|
-
|
|
8876
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:396
|
|
8877
|
-
|
|
8878
|
-
Always returns `about:blank` currently.
|
|
8879
|
-
|
|
8880
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/baseURI)
|
|
8881
|
-
|
|
8882
|
-
#### CDATA_SECTION_NODE
|
|
8883
|
-
|
|
8884
|
-
> `readonly` **CDATA_SECTION_NODE**: `4`
|
|
8885
|
-
|
|
8886
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:596
|
|
8887
|
-
|
|
8888
|
-
node is a CDATASection node.
|
|
8889
|
-
|
|
8890
|
-
#### childNodes
|
|
8891
|
-
|
|
8892
|
-
> `readonly` **childNodes**: `NodeList`
|
|
8893
|
-
|
|
8894
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:374
|
|
8895
|
-
|
|
8896
|
-
Returns the children.
|
|
8897
|
-
|
|
8898
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
8899
|
-
|
|
8900
|
-
#### columnNumber?
|
|
8901
|
-
|
|
8902
|
-
> `optional` **columnNumber**: `number`
|
|
8903
|
-
|
|
8904
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:479
|
|
8905
|
-
|
|
8906
|
-
One based column position inside the parsed source,
|
|
8907
|
-
if the `locator` was not disabled.
|
|
8908
|
-
|
|
8909
|
-
#### COMMENT_NODE
|
|
8910
|
-
|
|
8911
|
-
> `readonly` **COMMENT_NODE**: `8`
|
|
8912
|
-
|
|
8913
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:602
|
|
8914
|
-
|
|
8915
|
-
node is a Comment node.
|
|
8916
|
-
|
|
8917
|
-
#### DOCUMENT_FRAGMENT_NODE
|
|
8918
|
-
|
|
8919
|
-
> `readonly` **DOCUMENT_FRAGMENT_NODE**: `11`
|
|
8920
|
-
|
|
8921
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:608
|
|
8922
|
-
|
|
8923
|
-
node is a DocumentFragment node.
|
|
8924
|
-
|
|
8925
|
-
#### DOCUMENT_NODE
|
|
8926
|
-
|
|
8927
|
-
> `readonly` **DOCUMENT_NODE**: `9`
|
|
8928
|
-
|
|
8929
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:604
|
|
8930
|
-
|
|
8931
|
-
node is a document.
|
|
8932
|
-
|
|
8933
|
-
#### DOCUMENT_POSITION_CONTAINED_BY
|
|
8934
|
-
|
|
8935
|
-
> `readonly` **DOCUMENT_POSITION_CONTAINED_BY**: `16`
|
|
8936
|
-
|
|
8937
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:619
|
|
8938
|
-
|
|
8939
|
-
Set when other is a descendant of node.
|
|
8940
|
-
|
|
8941
|
-
#### DOCUMENT_POSITION_CONTAINS
|
|
8942
|
-
|
|
8943
|
-
> `readonly` **DOCUMENT_POSITION_CONTAINS**: `8`
|
|
8944
|
-
|
|
8945
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:617
|
|
8946
|
-
|
|
8947
|
-
Set when other is an ancestor of node.
|
|
8948
|
-
|
|
8949
|
-
#### DOCUMENT_POSITION_DISCONNECTED
|
|
8950
|
-
|
|
8951
|
-
> `readonly` **DOCUMENT_POSITION_DISCONNECTED**: `1`
|
|
8952
|
-
|
|
8953
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:611
|
|
8954
|
-
|
|
8955
|
-
Set when node and other are not in the same tree.
|
|
8956
|
-
|
|
8957
|
-
#### DOCUMENT_POSITION_FOLLOWING
|
|
8958
|
-
|
|
8959
|
-
> `readonly` **DOCUMENT_POSITION_FOLLOWING**: `4`
|
|
8960
|
-
|
|
8961
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:615
|
|
8962
|
-
|
|
8963
|
-
Set when other is following node.
|
|
8964
|
-
|
|
8965
|
-
#### DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
|
|
8966
|
-
|
|
8967
|
-
> `readonly` **DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC**: `32`
|
|
8968
|
-
|
|
8969
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:620
|
|
8970
|
-
|
|
8971
|
-
#### DOCUMENT_POSITION_PRECEDING
|
|
8972
|
-
|
|
8973
|
-
> `readonly` **DOCUMENT_POSITION_PRECEDING**: `2`
|
|
8974
|
-
|
|
8975
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:613
|
|
8976
|
-
|
|
8977
|
-
Set when other is preceding node.
|
|
8978
|
-
|
|
8979
|
-
#### DOCUMENT_TYPE_NODE
|
|
8980
|
-
|
|
8981
|
-
> `readonly` **DOCUMENT_TYPE_NODE**: `10`
|
|
8982
|
-
|
|
8983
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:606
|
|
8984
|
-
|
|
8985
|
-
node is a doctype.
|
|
8986
|
-
|
|
8987
|
-
#### ELEMENT_NODE
|
|
8988
|
-
|
|
8989
|
-
> `readonly` **ELEMENT_NODE**: `1`
|
|
8990
|
-
|
|
8991
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:591
|
|
8992
|
-
|
|
8993
|
-
node is an element.
|
|
8994
|
-
|
|
8995
|
-
#### ENTITY_NODE
|
|
8996
|
-
|
|
8997
|
-
> `readonly` **ENTITY_NODE**: `6`
|
|
8998
|
-
|
|
8999
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:598
|
|
9000
|
-
|
|
9001
|
-
#### ENTITY_REFERENCE_NODE
|
|
9002
|
-
|
|
9003
|
-
> `readonly` **ENTITY_REFERENCE_NODE**: `5`
|
|
9004
|
-
|
|
9005
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:597
|
|
9006
|
-
|
|
9007
|
-
#### firstChild
|
|
9008
|
-
|
|
9009
|
-
> `readonly` **firstChild**: [`Node`](#node-1) \| `null`
|
|
9010
|
-
|
|
9011
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:380
|
|
9012
|
-
|
|
9013
|
-
Returns the first child.
|
|
9014
|
-
|
|
9015
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
9016
|
-
|
|
9017
|
-
#### isConnected
|
|
9018
|
-
|
|
9019
|
-
> `readonly` **isConnected**: `boolean`
|
|
9020
|
-
|
|
9021
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:402
|
|
9022
|
-
|
|
9023
|
-
Returns true if this node is inside of a document or is the document node itself.
|
|
9024
|
-
|
|
9025
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected)
|
|
9026
|
-
|
|
9027
|
-
#### lastChild
|
|
9028
|
-
|
|
9029
|
-
> `readonly` **lastChild**: [`Node`](#node-1) \| `null`
|
|
9030
|
-
|
|
9031
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:386
|
|
9032
|
-
|
|
9033
|
-
Returns the last child.
|
|
9034
|
-
|
|
9035
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lastChild)
|
|
9036
|
-
|
|
9037
|
-
#### lineNumber?
|
|
9038
|
-
|
|
9039
|
-
> `optional` **lineNumber**: `number`
|
|
9040
|
-
|
|
9041
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:474
|
|
9042
|
-
|
|
9043
|
-
Zero based line position inside the parsed source,
|
|
9044
|
-
if the `locator` was not disabled.
|
|
9045
|
-
|
|
9046
|
-
#### localName
|
|
9047
|
-
|
|
9048
|
-
> **localName**: `string` \| `null`
|
|
9049
|
-
|
|
9050
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:390
|
|
9051
|
-
|
|
9052
|
-
The local part of the qualified name of this node.
|
|
9053
|
-
|
|
9054
|
-
#### namespaceURI
|
|
9055
|
-
|
|
9056
|
-
> `readonly` **namespaceURI**: `string` \| `null`
|
|
9057
|
-
|
|
9058
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:406
|
|
9059
|
-
|
|
9060
|
-
The namespace URI of this node.
|
|
9061
|
-
|
|
9062
|
-
#### nextSibling
|
|
9063
|
-
|
|
9064
|
-
> `readonly` **nextSibling**: [`Node`](#node-1) \| `null`
|
|
9065
|
-
|
|
9066
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:412
|
|
9067
|
-
|
|
9068
|
-
Returns the next sibling.
|
|
9069
|
-
|
|
9070
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nextSibling)
|
|
9071
|
-
|
|
9072
|
-
#### nodeName
|
|
9073
|
-
|
|
9074
|
-
> `readonly` **nodeName**: `string`
|
|
9075
|
-
|
|
9076
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:418
|
|
9077
|
-
|
|
9078
|
-
Returns a string appropriate for the type of node.
|
|
9079
|
-
|
|
9080
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeName)
|
|
9081
|
-
|
|
9082
|
-
#### nodeType
|
|
9083
|
-
|
|
9084
|
-
> `readonly` **nodeType**: `number`
|
|
9085
|
-
|
|
9086
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:424
|
|
9087
|
-
|
|
9088
|
-
Returns the type of node.
|
|
9089
|
-
|
|
9090
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeType)
|
|
9091
|
-
|
|
9092
|
-
#### nodeValue
|
|
9093
|
-
|
|
9094
|
-
> **nodeValue**: `string` \| `null`
|
|
9095
|
-
|
|
9096
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:426
|
|
9097
|
-
|
|
9098
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeValue)
|
|
9099
|
-
|
|
9100
|
-
#### NOTATION_NODE
|
|
9101
|
-
|
|
9102
|
-
> `readonly` **NOTATION_NODE**: `12`
|
|
9103
|
-
|
|
9104
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:609
|
|
9105
|
-
|
|
9106
|
-
#### ownerDocument
|
|
9107
|
-
|
|
9108
|
-
> `readonly` **ownerDocument**: [`Document`](#document-1) \| `null`
|
|
9109
|
-
|
|
9110
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:432
|
|
9111
|
-
|
|
9112
|
-
Returns the node document. Returns null for documents.
|
|
9113
|
-
|
|
9114
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument)
|
|
9115
|
-
|
|
9116
|
-
#### parentElement
|
|
9117
|
-
|
|
9118
|
-
> `readonly` **parentElement**: [`Element`](#element-1) \| `null`
|
|
9119
|
-
|
|
9120
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:444
|
|
9121
|
-
|
|
9122
|
-
Returns the parent `Node` if it is of type `Element`, otherwise `null`.
|
|
9123
|
-
|
|
9124
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentElement)
|
|
9125
|
-
|
|
9126
|
-
#### parentNode
|
|
9127
|
-
|
|
9128
|
-
> `readonly` **parentNode**: [`Node`](#node-1) \| `null`
|
|
9129
|
-
|
|
9130
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:438
|
|
9131
|
-
|
|
9132
|
-
Returns the parent.
|
|
9133
|
-
|
|
9134
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentNode)
|
|
9135
|
-
|
|
9136
|
-
#### prefix
|
|
9137
|
-
|
|
9138
|
-
> **prefix**: `string` \| `null`
|
|
9139
|
-
|
|
9140
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:448
|
|
9141
|
-
|
|
9142
|
-
The prefix of the namespace for this node.
|
|
9143
|
-
|
|
9144
|
-
#### previousSibling
|
|
9145
|
-
|
|
9146
|
-
> `readonly` **previousSibling**: [`Node`](#node-1) \| `null`
|
|
9147
|
-
|
|
9148
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:454
|
|
9149
|
-
|
|
9150
|
-
Returns the previous sibling.
|
|
9151
|
-
|
|
9152
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/previousSibling)
|
|
9153
|
-
|
|
9154
|
-
#### PROCESSING_INSTRUCTION_NODE
|
|
9155
|
-
|
|
9156
|
-
> `readonly` **PROCESSING_INSTRUCTION_NODE**: `7`
|
|
9157
|
-
|
|
9158
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:600
|
|
9159
|
-
|
|
9160
|
-
node is a ProcessingInstruction node.
|
|
9161
|
-
|
|
9162
|
-
#### TEXT_NODE
|
|
9163
|
-
|
|
9164
|
-
> `readonly` **TEXT_NODE**: `3`
|
|
9165
|
-
|
|
9166
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:594
|
|
9167
|
-
|
|
9168
|
-
node is a Text node.
|
|
9169
|
-
|
|
9170
|
-
#### textContent
|
|
9171
|
-
|
|
9172
|
-
> **textContent**: `string` \| `null`
|
|
9173
|
-
|
|
9174
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:468
|
|
9175
|
-
|
|
9176
|
-
The text content of this node and its descendants.
|
|
9177
|
-
|
|
9178
|
-
For [Element](#element-1) and DocumentFragment nodes, returns the concatenation of the
|
|
9179
|
-
`nodeValue` of every descendant text node, excluding processing instruction and comment
|
|
9180
|
-
nodes. For all other node types, returns `nodeValue`.
|
|
9181
|
-
|
|
9182
|
-
Setting `textContent` on an element or document fragment replaces all child nodes with a
|
|
9183
|
-
single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly.
|
|
9184
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/textContent)
|
|
9185
|
-
|
|
9186
|
-
##### See
|
|
9187
|
-
|
|
9188
|
-
[https://dom.spec.whatwg.org/#dom-node-textcontent](https://dom.spec.whatwg.org/#dom-node-textcontent)
|
|
9189
|
-
|
|
9190
|
-
### Methods
|
|
9191
|
-
|
|
9192
|
-
#### appendChild()
|
|
9193
|
-
|
|
9194
|
-
> **appendChild**(`node`): [`Node`](#node-1)
|
|
9195
|
-
|
|
9196
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:482
|
|
9197
|
-
|
|
9198
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/appendChild)
|
|
9199
|
-
|
|
9200
|
-
##### Parameters
|
|
9201
|
-
|
|
9202
|
-
| Parameter | Type |
|
|
9203
|
-
| --------- | ----------------- |
|
|
9204
|
-
| `node` | [`Node`](#node-1) |
|
|
9205
|
-
|
|
9206
|
-
##### Returns
|
|
9207
|
-
|
|
9208
|
-
[`Node`](#node-1)
|
|
9209
|
-
|
|
9210
|
-
#### cloneNode()
|
|
9211
|
-
|
|
9212
|
-
> **cloneNode**(`deep?`): [`Node`](#node-1)
|
|
9213
|
-
|
|
9214
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:533
|
|
9215
|
-
|
|
9216
|
-
Returns a copy of node. If deep is true, the copy also includes the node's descendants.
|
|
9217
|
-
|
|
9218
|
-
##### Parameters
|
|
9219
|
-
|
|
9220
|
-
| Parameter | Type |
|
|
9221
|
-
| --------- | --------- |
|
|
9222
|
-
| `deep?` | `boolean` |
|
|
9223
|
-
|
|
9224
|
-
##### Returns
|
|
9225
|
-
|
|
9226
|
-
[`Node`](#node-1)
|
|
9227
|
-
|
|
9228
|
-
##### Throws
|
|
9229
|
-
|
|
9230
|
-
May throw a DOMException if operations within [Element#setAttributeNode](#setattributenode) or
|
|
9231
|
-
[Node#appendChild](#appendchild-8) (which are potentially invoked in this method) do not meet their
|
|
9232
|
-
specific constraints.
|
|
9233
|
-
|
|
9234
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/cloneNode)
|
|
9235
|
-
|
|
9236
|
-
#### compareDocumentPosition()
|
|
9237
|
-
|
|
9238
|
-
> **compareDocumentPosition**(`other`): `number`
|
|
9239
|
-
|
|
9240
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:540
|
|
9241
|
-
|
|
9242
|
-
Returns a bitmask indicating the position of other relative to node.
|
|
9243
|
-
|
|
9244
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/compareDocumentPosition)
|
|
9245
|
-
|
|
9246
|
-
##### Parameters
|
|
9247
|
-
|
|
9248
|
-
| Parameter | Type |
|
|
9249
|
-
| --------- | ----------------- |
|
|
9250
|
-
| `other` | [`Node`](#node-1) |
|
|
9251
|
-
|
|
9252
|
-
##### Returns
|
|
9253
|
-
|
|
9254
|
-
`number`
|
|
9255
|
-
|
|
9256
|
-
#### contains()
|
|
9257
|
-
|
|
9258
|
-
> **contains**(`other`): `boolean`
|
|
9259
|
-
|
|
9260
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:489
|
|
9261
|
-
|
|
9262
|
-
Checks whether `other` is an inclusive descendant of this node.
|
|
9263
|
-
|
|
9264
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/contains)
|
|
9265
|
-
|
|
9266
|
-
##### Parameters
|
|
9267
|
-
|
|
9268
|
-
| Parameter | Type |
|
|
9269
|
-
| --------- | ------------------------------------------ |
|
|
9270
|
-
| `other` | [`Node`](#node-1) \| `null` \| `undefined` |
|
|
9271
|
-
|
|
9272
|
-
##### Returns
|
|
9273
|
-
|
|
9274
|
-
`boolean`
|
|
9275
|
-
|
|
9276
|
-
#### getRootNode()
|
|
9277
|
-
|
|
9278
|
-
> **getRootNode**(`options`): [`Node`](#node-1)
|
|
9279
|
-
|
|
9280
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:502
|
|
9281
|
-
|
|
9282
|
-
Searches for the root node of this node.
|
|
9283
|
-
|
|
9284
|
-
**This behavior is slightly different from the one in the specs**:
|
|
9285
|
-
|
|
9286
|
-
- ignores `options.composed`, since `ShadowRoot`s are unsupported, therefore always
|
|
9287
|
-
returning root.
|
|
9288
|
-
|
|
9289
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode)
|
|
9290
|
-
|
|
9291
|
-
##### Parameters
|
|
9292
|
-
|
|
9293
|
-
| Parameter | Type |
|
|
9294
|
-
| --------- | -------------------- |
|
|
9295
|
-
| `options` | `GetRootNodeOptions` |
|
|
9296
|
-
|
|
9297
|
-
##### Returns
|
|
9298
|
-
|
|
9299
|
-
[`Node`](#node-1)
|
|
9300
|
-
|
|
9301
|
-
##### See
|
|
9302
|
-
|
|
9303
|
-
- https://dom.spec.whatwg.org/#dom-node-getrootnode
|
|
9304
|
-
- https://dom.spec.whatwg.org/#concept-shadow-including-root
|
|
9305
|
-
|
|
9306
|
-
#### hasChildNodes()
|
|
9307
|
-
|
|
9308
|
-
> **hasChildNodes**(): `boolean`
|
|
9309
|
-
|
|
9310
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:547
|
|
9311
|
-
|
|
9312
|
-
Returns whether node has children.
|
|
9313
|
-
|
|
9314
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/hasChildNodes)
|
|
9315
|
-
|
|
9316
|
-
##### Returns
|
|
9317
|
-
|
|
9318
|
-
`boolean`
|
|
9319
|
-
|
|
9320
|
-
#### insertBefore()
|
|
9321
|
-
|
|
9322
|
-
> **insertBefore**(`node`, `child`): [`Node`](#node-1)
|
|
9323
|
-
|
|
9324
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:550
|
|
9325
|
-
|
|
9326
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/insertBefore)
|
|
9327
|
-
|
|
9328
|
-
##### Parameters
|
|
9329
|
-
|
|
9330
|
-
| Parameter | Type |
|
|
9331
|
-
| --------- | --------------------------- |
|
|
9332
|
-
| `node` | [`Node`](#node-1) |
|
|
9333
|
-
| `child` | [`Node`](#node-1) \| `null` |
|
|
9334
|
-
|
|
9335
|
-
##### Returns
|
|
9336
|
-
|
|
9337
|
-
[`Node`](#node-1)
|
|
9338
|
-
|
|
9339
|
-
#### isDefaultNamespace()
|
|
9340
|
-
|
|
9341
|
-
> **isDefaultNamespace**(`namespace`): `boolean`
|
|
9342
|
-
|
|
9343
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:553
|
|
9344
|
-
|
|
9345
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/isDefaultNamespace)
|
|
9346
|
-
|
|
9347
|
-
##### Parameters
|
|
9348
|
-
|
|
9349
|
-
| Parameter | Type |
|
|
9350
|
-
| ----------- | ------------------ |
|
|
9351
|
-
| `namespace` | `string` \| `null` |
|
|
9352
|
-
|
|
9353
|
-
##### Returns
|
|
9354
|
-
|
|
9355
|
-
`boolean`
|
|
9356
|
-
|
|
9357
|
-
#### isEqualNode()
|
|
9358
|
-
|
|
9359
|
-
> **isEqualNode**(`other`): `boolean`
|
|
9360
|
-
|
|
9361
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:514
|
|
9362
|
-
|
|
9363
|
-
Checks whether the given node is equal to this node.
|
|
9364
|
-
|
|
9365
|
-
Two nodes are equal when they have the same type, defining characteristics (for the type),
|
|
9366
|
-
and the same `childNodes`. The comparison is iterative to avoid stack overflows on deeply
|
|
9367
|
-
nested trees. `Attribute` nodes of each `Element` pair are also compared iteratively.
|
|
9368
|
-
|
|
9369
|
-
##### Parameters
|
|
9370
|
-
|
|
9371
|
-
| Parameter | Type |
|
|
9372
|
-
| --------- | ----------------- |
|
|
9373
|
-
| `other` | [`Node`](#node-1) |
|
|
9374
|
-
|
|
9375
|
-
##### Returns
|
|
9376
|
-
|
|
9377
|
-
`boolean`
|
|
9378
|
-
|
|
9379
|
-
##### See
|
|
9380
|
-
|
|
9381
|
-
- [https://dom.spec.whatwg.org/#concept-node-equals](https://dom.spec.whatwg.org/#concept-node-equals)
|
|
9382
|
-
- [https://developer.mozilla.org/en-US/docs/Web/API/Node/isEqualNode](https://developer.mozilla.org/en-US/docs/Web/API/Node/isEqualNode)
|
|
9383
|
-
|
|
9384
|
-
#### isSameNode()
|
|
9385
|
-
|
|
9386
|
-
> **isSameNode**(`other`): `boolean`
|
|
9387
|
-
|
|
9388
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:521
|
|
9389
|
-
|
|
9390
|
-
Checks whether the given node is this node.
|
|
9391
|
-
|
|
9392
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/isSameNode)
|
|
9393
|
-
|
|
9394
|
-
##### Parameters
|
|
9395
|
-
|
|
9396
|
-
| Parameter | Type |
|
|
9397
|
-
| --------- | ----------------- |
|
|
9398
|
-
| `other` | [`Node`](#node-1) |
|
|
9399
|
-
|
|
9400
|
-
##### Returns
|
|
9401
|
-
|
|
9402
|
-
`boolean`
|
|
9403
|
-
|
|
9404
|
-
#### ~~isSupported()~~
|
|
9405
|
-
|
|
9406
|
-
> **isSupported**(`feature`, `version`): `true`
|
|
9407
|
-
|
|
9408
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:568
|
|
9409
|
-
|
|
9410
|
-
Checks whether the DOM implementation implements a specific feature and its version.
|
|
9411
|
-
|
|
9412
|
-
##### Parameters
|
|
9413
|
-
|
|
9414
|
-
| Parameter | Type | Description |
|
|
9415
|
-
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
9416
|
-
| `feature` | `string` | The package name of the feature to test. This is the same name that can be passed to the method `hasFeature` on `DOMImplementation`. |
|
|
9417
|
-
| `version` | `string` | This is the version number of the package name to test. |
|
|
9418
|
-
|
|
9419
|
-
##### Returns
|
|
9420
|
-
|
|
9421
|
-
`true`
|
|
9422
|
-
|
|
9423
|
-
##### Deprecated
|
|
9424
|
-
|
|
9425
|
-
Since `DOMImplementation.hasFeature` is deprecated and always returns true.
|
|
9426
|
-
|
|
9427
|
-
##### Since
|
|
9428
|
-
|
|
9429
|
-
Introduced in DOM Level 2
|
|
9430
|
-
|
|
9431
|
-
##### See
|
|
9432
|
-
|
|
9433
|
-
DOMImplementation.hasFeature
|
|
9434
|
-
|
|
9435
|
-
#### lookupNamespaceURI()
|
|
9436
|
-
|
|
9437
|
-
> **lookupNamespaceURI**(`prefix`): `string` \| `null`
|
|
9438
|
-
|
|
9439
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:571
|
|
9440
|
-
|
|
9441
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupNamespaceURI)
|
|
9442
|
-
|
|
9443
|
-
##### Parameters
|
|
9444
|
-
|
|
9445
|
-
| Parameter | Type |
|
|
9446
|
-
| --------- | ------------------ |
|
|
9447
|
-
| `prefix` | `string` \| `null` |
|
|
9448
|
-
|
|
9449
|
-
##### Returns
|
|
9450
|
-
|
|
9451
|
-
`string` \| `null`
|
|
9452
|
-
|
|
9453
|
-
#### lookupPrefix()
|
|
9454
|
-
|
|
9455
|
-
> **lookupPrefix**(`namespace`): `string` \| `null`
|
|
9456
|
-
|
|
9457
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:574
|
|
9458
|
-
|
|
9459
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupPrefix)
|
|
9460
|
-
|
|
9461
|
-
##### Parameters
|
|
9462
|
-
|
|
9463
|
-
| Parameter | Type |
|
|
9464
|
-
| ----------- | ------------------ |
|
|
9465
|
-
| `namespace` | `string` \| `null` |
|
|
9466
|
-
|
|
9467
|
-
##### Returns
|
|
9468
|
-
|
|
9469
|
-
`string` \| `null`
|
|
9470
|
-
|
|
9471
|
-
#### normalize()
|
|
9472
|
-
|
|
9473
|
-
> **normalize**(): `void`
|
|
9474
|
-
|
|
9475
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:582
|
|
9476
|
-
|
|
9477
|
-
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous
|
|
9478
|
-
exclusive Text nodes into the first of their nodes.
|
|
9479
|
-
|
|
9480
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/normalize)
|
|
9481
|
-
|
|
9482
|
-
##### Returns
|
|
9483
|
-
|
|
9484
|
-
`void`
|
|
9485
|
-
|
|
9486
|
-
#### removeChild()
|
|
9487
|
-
|
|
9488
|
-
> **removeChild**(`child`): [`Node`](#node-1)
|
|
9489
|
-
|
|
9490
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:585
|
|
9491
|
-
|
|
9492
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/removeChild)
|
|
9493
|
-
|
|
9494
|
-
##### Parameters
|
|
9495
|
-
|
|
9496
|
-
| Parameter | Type |
|
|
9497
|
-
| --------- | ----------------- |
|
|
9498
|
-
| `child` | [`Node`](#node-1) |
|
|
9499
|
-
|
|
9500
|
-
##### Returns
|
|
9501
|
-
|
|
9502
|
-
[`Node`](#node-1)
|
|
9503
|
-
|
|
9504
|
-
#### replaceChild()
|
|
9505
|
-
|
|
9506
|
-
> **replaceChild**(`node`, `child`): [`Node`](#node-1)
|
|
9507
|
-
|
|
9508
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:588
|
|
9509
|
-
|
|
9510
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/replaceChild)
|
|
9511
|
-
|
|
9512
|
-
##### Parameters
|
|
9513
|
-
|
|
9514
|
-
| Parameter | Type |
|
|
9515
|
-
| --------- | ----------------- |
|
|
9516
|
-
| `node` | [`Node`](#node-1) |
|
|
9517
|
-
| `child` | [`Node`](#node-1) |
|
|
9518
|
-
|
|
9519
|
-
##### Returns
|
|
9520
|
-
|
|
9521
|
-
[`Node`](#node-1)
|
|
9522
|
-
|
|
9523
|
-
---
|
|
9524
|
-
|
|
9525
|
-
## Text
|
|
9526
|
-
|
|
9527
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1051
|
|
9528
|
-
|
|
9529
|
-
The textual content of Element or Attr. If an element has no markup within its content, it has
|
|
9530
|
-
a single child implementing Text that contains the element's text. However, if the element
|
|
9531
|
-
contains markup, it is parsed into information items and Text nodes that form its children.
|
|
9532
|
-
|
|
9533
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Text)
|
|
9534
|
-
|
|
9535
|
-
### Extends
|
|
9536
|
-
|
|
9537
|
-
- `CharacterData`
|
|
9538
|
-
|
|
9539
|
-
### Properties
|
|
9540
|
-
|
|
9541
|
-
#### ATTRIBUTE_NODE
|
|
9542
|
-
|
|
9543
|
-
> `readonly` **ATTRIBUTE_NODE**: `2`
|
|
9544
|
-
|
|
9545
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:592
|
|
9546
|
-
|
|
9547
|
-
##### Inherited from
|
|
9548
|
-
|
|
9549
|
-
`CharacterData.ATTRIBUTE_NODE`
|
|
9550
|
-
|
|
9551
|
-
#### baseURI
|
|
9552
|
-
|
|
9553
|
-
> `readonly` **baseURI**: `"about:blank"`
|
|
9554
|
-
|
|
9555
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:396
|
|
9556
|
-
|
|
9557
|
-
Always returns `about:blank` currently.
|
|
9558
|
-
|
|
9559
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/baseURI)
|
|
9560
|
-
|
|
9561
|
-
##### Inherited from
|
|
9562
|
-
|
|
9563
|
-
`CharacterData.baseURI`
|
|
9564
|
-
|
|
9565
|
-
#### CDATA_SECTION_NODE
|
|
9566
|
-
|
|
9567
|
-
> `readonly` **CDATA_SECTION_NODE**: `4`
|
|
9568
|
-
|
|
9569
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:596
|
|
9570
|
-
|
|
9571
|
-
node is a CDATASection node.
|
|
9572
|
-
|
|
9573
|
-
##### Inherited from
|
|
9574
|
-
|
|
9575
|
-
`CharacterData.CDATA_SECTION_NODE`
|
|
9576
|
-
|
|
9577
|
-
#### childNodes
|
|
9578
|
-
|
|
9579
|
-
> `readonly` **childNodes**: `NodeList`
|
|
9580
|
-
|
|
9581
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:374
|
|
9582
|
-
|
|
9583
|
-
Returns the children.
|
|
9584
|
-
|
|
9585
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
9586
|
-
|
|
9587
|
-
##### Inherited from
|
|
9588
|
-
|
|
9589
|
-
`CharacterData.childNodes`
|
|
9590
|
-
|
|
9591
|
-
#### columnNumber?
|
|
9592
|
-
|
|
9593
|
-
> `optional` **columnNumber**: `number`
|
|
9594
|
-
|
|
9595
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:479
|
|
9596
|
-
|
|
9597
|
-
One based column position inside the parsed source,
|
|
9598
|
-
if the `locator` was not disabled.
|
|
9599
|
-
|
|
9600
|
-
##### Inherited from
|
|
9601
|
-
|
|
9602
|
-
`CharacterData.columnNumber`
|
|
9603
|
-
|
|
9604
|
-
#### COMMENT_NODE
|
|
9605
|
-
|
|
9606
|
-
> `readonly` **COMMENT_NODE**: `8`
|
|
9607
|
-
|
|
9608
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:602
|
|
9609
|
-
|
|
9610
|
-
node is a Comment node.
|
|
9611
|
-
|
|
9612
|
-
##### Inherited from
|
|
9613
|
-
|
|
9614
|
-
`CharacterData.COMMENT_NODE`
|
|
9615
|
-
|
|
9616
|
-
#### data
|
|
9617
|
-
|
|
9618
|
-
> **data**: `string`
|
|
9619
|
-
|
|
9620
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1019
|
|
9621
|
-
|
|
9622
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/data)
|
|
9623
|
-
|
|
9624
|
-
##### Inherited from
|
|
9625
|
-
|
|
9626
|
-
`CharacterData.data`
|
|
9627
|
-
|
|
9628
|
-
#### DOCUMENT_FRAGMENT_NODE
|
|
9629
|
-
|
|
9630
|
-
> `readonly` **DOCUMENT_FRAGMENT_NODE**: `11`
|
|
9631
|
-
|
|
9632
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:608
|
|
9633
|
-
|
|
9634
|
-
node is a DocumentFragment node.
|
|
9635
|
-
|
|
9636
|
-
##### Inherited from
|
|
9637
|
-
|
|
9638
|
-
`CharacterData.DOCUMENT_FRAGMENT_NODE`
|
|
9639
|
-
|
|
9640
|
-
#### DOCUMENT_NODE
|
|
9641
|
-
|
|
9642
|
-
> `readonly` **DOCUMENT_NODE**: `9`
|
|
9643
|
-
|
|
9644
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:604
|
|
9645
|
-
|
|
9646
|
-
node is a document.
|
|
9647
|
-
|
|
9648
|
-
##### Inherited from
|
|
9649
|
-
|
|
9650
|
-
`CharacterData.DOCUMENT_NODE`
|
|
9651
|
-
|
|
9652
|
-
#### DOCUMENT_POSITION_CONTAINED_BY
|
|
9653
|
-
|
|
9654
|
-
> `readonly` **DOCUMENT_POSITION_CONTAINED_BY**: `16`
|
|
9655
|
-
|
|
9656
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:619
|
|
9657
|
-
|
|
9658
|
-
Set when other is a descendant of node.
|
|
9659
|
-
|
|
9660
|
-
##### Inherited from
|
|
9661
|
-
|
|
9662
|
-
`CharacterData.DOCUMENT_POSITION_CONTAINED_BY`
|
|
9663
|
-
|
|
9664
|
-
#### DOCUMENT_POSITION_CONTAINS
|
|
9665
|
-
|
|
9666
|
-
> `readonly` **DOCUMENT_POSITION_CONTAINS**: `8`
|
|
9667
|
-
|
|
9668
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:617
|
|
9669
|
-
|
|
9670
|
-
Set when other is an ancestor of node.
|
|
9671
|
-
|
|
9672
|
-
##### Inherited from
|
|
9673
|
-
|
|
9674
|
-
`CharacterData.DOCUMENT_POSITION_CONTAINS`
|
|
9675
|
-
|
|
9676
|
-
#### DOCUMENT_POSITION_DISCONNECTED
|
|
9677
|
-
|
|
9678
|
-
> `readonly` **DOCUMENT_POSITION_DISCONNECTED**: `1`
|
|
9679
|
-
|
|
9680
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:611
|
|
9681
|
-
|
|
9682
|
-
Set when node and other are not in the same tree.
|
|
9683
|
-
|
|
9684
|
-
##### Inherited from
|
|
9685
|
-
|
|
9686
|
-
`CharacterData.DOCUMENT_POSITION_DISCONNECTED`
|
|
9687
|
-
|
|
9688
|
-
#### DOCUMENT_POSITION_FOLLOWING
|
|
9689
|
-
|
|
9690
|
-
> `readonly` **DOCUMENT_POSITION_FOLLOWING**: `4`
|
|
9691
|
-
|
|
9692
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:615
|
|
9693
|
-
|
|
9694
|
-
Set when other is following node.
|
|
9695
|
-
|
|
9696
|
-
##### Inherited from
|
|
9697
|
-
|
|
9698
|
-
`CharacterData.DOCUMENT_POSITION_FOLLOWING`
|
|
9699
|
-
|
|
9700
|
-
#### DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
|
|
9701
|
-
|
|
9702
|
-
> `readonly` **DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC**: `32`
|
|
9703
|
-
|
|
9704
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:620
|
|
9705
|
-
|
|
9706
|
-
##### Inherited from
|
|
9707
|
-
|
|
9708
|
-
`CharacterData.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC`
|
|
9709
|
-
|
|
9710
|
-
#### DOCUMENT_POSITION_PRECEDING
|
|
9711
|
-
|
|
9712
|
-
> `readonly` **DOCUMENT_POSITION_PRECEDING**: `2`
|
|
9713
|
-
|
|
9714
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:613
|
|
9715
|
-
|
|
9716
|
-
Set when other is preceding node.
|
|
9717
|
-
|
|
9718
|
-
##### Inherited from
|
|
9719
|
-
|
|
9720
|
-
`CharacterData.DOCUMENT_POSITION_PRECEDING`
|
|
9721
|
-
|
|
9722
|
-
#### DOCUMENT_TYPE_NODE
|
|
9723
|
-
|
|
9724
|
-
> `readonly` **DOCUMENT_TYPE_NODE**: `10`
|
|
9725
|
-
|
|
9726
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:606
|
|
9727
|
-
|
|
9728
|
-
node is a doctype.
|
|
9729
|
-
|
|
9730
|
-
##### Inherited from
|
|
9731
|
-
|
|
9732
|
-
`CharacterData.DOCUMENT_TYPE_NODE`
|
|
9733
|
-
|
|
9734
|
-
#### ELEMENT_NODE
|
|
9735
|
-
|
|
9736
|
-
> `readonly` **ELEMENT_NODE**: `1`
|
|
9737
|
-
|
|
9738
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:591
|
|
9739
|
-
|
|
9740
|
-
node is an element.
|
|
9741
|
-
|
|
9742
|
-
##### Inherited from
|
|
9743
|
-
|
|
9744
|
-
`CharacterData.ELEMENT_NODE`
|
|
9745
|
-
|
|
9746
|
-
#### ENTITY_NODE
|
|
9747
|
-
|
|
9748
|
-
> `readonly` **ENTITY_NODE**: `6`
|
|
9749
|
-
|
|
9750
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:598
|
|
9751
|
-
|
|
9752
|
-
##### Inherited from
|
|
9753
|
-
|
|
9754
|
-
`CharacterData.ENTITY_NODE`
|
|
9755
|
-
|
|
9756
|
-
#### ENTITY_REFERENCE_NODE
|
|
9757
|
-
|
|
9758
|
-
> `readonly` **ENTITY_REFERENCE_NODE**: `5`
|
|
9759
|
-
|
|
9760
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:597
|
|
9761
|
-
|
|
9762
|
-
##### Inherited from
|
|
9763
|
-
|
|
9764
|
-
`CharacterData.ENTITY_REFERENCE_NODE`
|
|
9765
|
-
|
|
9766
|
-
#### firstChild
|
|
9767
|
-
|
|
9768
|
-
> `readonly` **firstChild**: [`Node`](#node-1) \| `null`
|
|
9769
|
-
|
|
9770
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:380
|
|
9771
|
-
|
|
9772
|
-
Returns the first child.
|
|
9773
|
-
|
|
9774
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
9775
|
-
|
|
9776
|
-
##### Inherited from
|
|
9777
|
-
|
|
9778
|
-
`CharacterData.firstChild`
|
|
9779
|
-
|
|
9780
|
-
#### isConnected
|
|
9781
|
-
|
|
9782
|
-
> `readonly` **isConnected**: `boolean`
|
|
9783
|
-
|
|
9784
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:402
|
|
9785
|
-
|
|
9786
|
-
Returns true if this node is inside of a document or is the document node itself.
|
|
9787
|
-
|
|
9788
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected)
|
|
9789
|
-
|
|
9790
|
-
##### Inherited from
|
|
9791
|
-
|
|
9792
|
-
`CharacterData.isConnected`
|
|
9793
|
-
|
|
9794
|
-
#### lastChild
|
|
9795
|
-
|
|
9796
|
-
> `readonly` **lastChild**: [`Node`](#node-1) \| `null`
|
|
9797
|
-
|
|
9798
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:386
|
|
9799
|
-
|
|
9800
|
-
Returns the last child.
|
|
9801
|
-
|
|
9802
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lastChild)
|
|
9803
|
-
|
|
9804
|
-
##### Inherited from
|
|
9805
|
-
|
|
9806
|
-
`CharacterData.lastChild`
|
|
9807
|
-
|
|
9808
|
-
#### length
|
|
9809
|
-
|
|
9810
|
-
> `readonly` **length**: `number`
|
|
9811
|
-
|
|
9812
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1021
|
|
9813
|
-
|
|
9814
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/length)
|
|
9815
|
-
|
|
9816
|
-
##### Inherited from
|
|
9817
|
-
|
|
9818
|
-
`CharacterData.length`
|
|
9819
|
-
|
|
9820
|
-
#### lineNumber?
|
|
9821
|
-
|
|
9822
|
-
> `optional` **lineNumber**: `number`
|
|
9823
|
-
|
|
9824
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:474
|
|
9825
|
-
|
|
9826
|
-
Zero based line position inside the parsed source,
|
|
9827
|
-
if the `locator` was not disabled.
|
|
9828
|
-
|
|
9829
|
-
##### Inherited from
|
|
9830
|
-
|
|
9831
|
-
`CharacterData.lineNumber`
|
|
9832
|
-
|
|
9833
|
-
#### localName
|
|
9834
|
-
|
|
9835
|
-
> **localName**: `string` \| `null`
|
|
9836
|
-
|
|
9837
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:390
|
|
9838
|
-
|
|
9839
|
-
The local part of the qualified name of this node.
|
|
9840
|
-
|
|
9841
|
-
##### Inherited from
|
|
9842
|
-
|
|
9843
|
-
`CharacterData.localName`
|
|
9844
|
-
|
|
9845
|
-
#### namespaceURI
|
|
9846
|
-
|
|
9847
|
-
> `readonly` **namespaceURI**: `string` \| `null`
|
|
9848
|
-
|
|
9849
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:406
|
|
9850
|
-
|
|
9851
|
-
The namespace URI of this node.
|
|
9852
|
-
|
|
9853
|
-
##### Inherited from
|
|
9854
|
-
|
|
9855
|
-
`CharacterData.namespaceURI`
|
|
9856
|
-
|
|
9857
|
-
#### nextSibling
|
|
9858
|
-
|
|
9859
|
-
> `readonly` **nextSibling**: [`Node`](#node-1) \| `null`
|
|
9860
|
-
|
|
9861
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:412
|
|
9862
|
-
|
|
9863
|
-
Returns the next sibling.
|
|
9864
|
-
|
|
9865
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nextSibling)
|
|
9866
|
-
|
|
9867
|
-
##### Inherited from
|
|
9868
|
-
|
|
9869
|
-
`CharacterData.nextSibling`
|
|
9870
|
-
|
|
9871
|
-
#### nodeName
|
|
9872
|
-
|
|
9873
|
-
> **nodeName**: `"#text"` \| `"#cdata-section"`
|
|
9874
|
-
|
|
9875
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1052
|
|
9876
|
-
|
|
9877
|
-
Returns a string appropriate for the type of node.
|
|
9878
|
-
|
|
9879
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeName)
|
|
9880
|
-
|
|
9881
|
-
##### Overrides
|
|
9882
|
-
|
|
9883
|
-
`CharacterData.nodeName`
|
|
9884
|
-
|
|
9885
|
-
#### nodeType
|
|
9886
|
-
|
|
9887
|
-
> **nodeType**: `3` \| `4`
|
|
9888
|
-
|
|
9889
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1053
|
|
9890
|
-
|
|
9891
|
-
Returns the type of node.
|
|
9892
|
-
|
|
9893
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeType)
|
|
9894
|
-
|
|
9895
|
-
##### Overrides
|
|
9896
|
-
|
|
9897
|
-
`CharacterData.nodeType`
|
|
9898
|
-
|
|
9899
|
-
#### nodeValue
|
|
9900
|
-
|
|
9901
|
-
> **nodeValue**: `string` \| `null`
|
|
9902
|
-
|
|
9903
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:426
|
|
9904
|
-
|
|
9905
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeValue)
|
|
9906
|
-
|
|
9907
|
-
##### Inherited from
|
|
9908
|
-
|
|
9909
|
-
`CharacterData.nodeValue`
|
|
9910
|
-
|
|
9911
|
-
#### NOTATION_NODE
|
|
9912
|
-
|
|
9913
|
-
> `readonly` **NOTATION_NODE**: `12`
|
|
9914
|
-
|
|
9915
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:609
|
|
9916
|
-
|
|
9917
|
-
##### Inherited from
|
|
9918
|
-
|
|
9919
|
-
`CharacterData.NOTATION_NODE`
|
|
9920
|
-
|
|
9921
|
-
#### ownerDocument
|
|
9922
|
-
|
|
9923
|
-
> `readonly` **ownerDocument**: [`Document`](#document-1)
|
|
9924
|
-
|
|
9925
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1022
|
|
9926
|
-
|
|
9927
|
-
Returns the node document. Returns null for documents.
|
|
9928
|
-
|
|
9929
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument)
|
|
9930
|
-
|
|
9931
|
-
##### Inherited from
|
|
9932
|
-
|
|
9933
|
-
`CharacterData.ownerDocument`
|
|
9934
|
-
|
|
9935
|
-
#### parentElement
|
|
9936
|
-
|
|
9937
|
-
> `readonly` **parentElement**: [`Element`](#element-1) \| `null`
|
|
9938
|
-
|
|
9939
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:444
|
|
9940
|
-
|
|
9941
|
-
Returns the parent `Node` if it is of type `Element`, otherwise `null`.
|
|
9942
|
-
|
|
9943
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentElement)
|
|
9944
|
-
|
|
9945
|
-
##### Inherited from
|
|
9946
|
-
|
|
9947
|
-
`CharacterData.parentElement`
|
|
9948
|
-
|
|
9949
|
-
#### parentNode
|
|
9950
|
-
|
|
9951
|
-
> `readonly` **parentNode**: [`Node`](#node-1) \| `null`
|
|
9952
|
-
|
|
9953
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:438
|
|
9954
|
-
|
|
9955
|
-
Returns the parent.
|
|
9956
|
-
|
|
9957
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentNode)
|
|
9958
|
-
|
|
9959
|
-
##### Inherited from
|
|
9960
|
-
|
|
9961
|
-
`CharacterData.parentNode`
|
|
9962
|
-
|
|
9963
|
-
#### prefix
|
|
9964
|
-
|
|
9965
|
-
> **prefix**: `string` \| `null`
|
|
9966
|
-
|
|
9967
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:448
|
|
9968
|
-
|
|
9969
|
-
The prefix of the namespace for this node.
|
|
9970
|
-
|
|
9971
|
-
##### Inherited from
|
|
9972
|
-
|
|
9973
|
-
`CharacterData.prefix`
|
|
9974
|
-
|
|
9975
|
-
#### previousSibling
|
|
9976
|
-
|
|
9977
|
-
> `readonly` **previousSibling**: [`Node`](#node-1) \| `null`
|
|
9978
|
-
|
|
9979
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:454
|
|
9980
|
-
|
|
9981
|
-
Returns the previous sibling.
|
|
9982
|
-
|
|
9983
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/previousSibling)
|
|
9984
|
-
|
|
9985
|
-
##### Inherited from
|
|
9986
|
-
|
|
9987
|
-
`CharacterData.previousSibling`
|
|
9988
|
-
|
|
9989
|
-
#### PROCESSING_INSTRUCTION_NODE
|
|
9990
|
-
|
|
9991
|
-
> `readonly` **PROCESSING_INSTRUCTION_NODE**: `7`
|
|
9992
|
-
|
|
9993
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:600
|
|
9994
|
-
|
|
9995
|
-
node is a ProcessingInstruction node.
|
|
9996
|
-
|
|
9997
|
-
##### Inherited from
|
|
9998
|
-
|
|
9999
|
-
`CharacterData.PROCESSING_INSTRUCTION_NODE`
|
|
10000
|
-
|
|
10001
|
-
#### TEXT_NODE
|
|
10002
|
-
|
|
10003
|
-
> `readonly` **TEXT_NODE**: `3`
|
|
10004
|
-
|
|
10005
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:594
|
|
10006
|
-
|
|
10007
|
-
node is a Text node.
|
|
10008
|
-
|
|
10009
|
-
##### Inherited from
|
|
10010
|
-
|
|
10011
|
-
`CharacterData.TEXT_NODE`
|
|
10012
|
-
|
|
10013
|
-
#### textContent
|
|
10014
|
-
|
|
10015
|
-
> **textContent**: `string` \| `null`
|
|
10016
|
-
|
|
10017
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:468
|
|
10018
|
-
|
|
10019
|
-
The text content of this node and its descendants.
|
|
10020
|
-
|
|
10021
|
-
For [Element](#element-1) and DocumentFragment nodes, returns the concatenation of the
|
|
10022
|
-
`nodeValue` of every descendant text node, excluding processing instruction and comment
|
|
10023
|
-
nodes. For all other node types, returns `nodeValue`.
|
|
10024
|
-
|
|
10025
|
-
Setting `textContent` on an element or document fragment replaces all child nodes with a
|
|
10026
|
-
single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly.
|
|
10027
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/textContent)
|
|
10028
|
-
|
|
10029
|
-
##### See
|
|
10030
|
-
|
|
10031
|
-
[https://dom.spec.whatwg.org/#dom-node-textcontent](https://dom.spec.whatwg.org/#dom-node-textcontent)
|
|
10032
|
-
|
|
10033
|
-
##### Inherited from
|
|
10034
|
-
|
|
10035
|
-
`CharacterData.textContent`
|
|
10036
|
-
|
|
10037
|
-
### Methods
|
|
10038
|
-
|
|
10039
|
-
#### appendChild()
|
|
10040
|
-
|
|
10041
|
-
> **appendChild**(`node`): [`Node`](#node-1)
|
|
10042
|
-
|
|
10043
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:482
|
|
10044
|
-
|
|
10045
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/appendChild)
|
|
10046
|
-
|
|
10047
|
-
##### Parameters
|
|
10048
|
-
|
|
10049
|
-
| Parameter | Type |
|
|
10050
|
-
| --------- | ----------------- |
|
|
10051
|
-
| `node` | [`Node`](#node-1) |
|
|
10052
|
-
|
|
10053
|
-
##### Returns
|
|
10054
|
-
|
|
10055
|
-
[`Node`](#node-1)
|
|
10056
|
-
|
|
10057
|
-
##### Inherited from
|
|
10058
|
-
|
|
10059
|
-
`CharacterData.appendChild`
|
|
10060
|
-
|
|
10061
|
-
#### appendData()
|
|
10062
|
-
|
|
10063
|
-
> **appendData**(`data`): `void`
|
|
10064
|
-
|
|
10065
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1024
|
|
10066
|
-
|
|
10067
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/appendData)
|
|
10068
|
-
|
|
10069
|
-
##### Parameters
|
|
10070
|
-
|
|
10071
|
-
| Parameter | Type |
|
|
10072
|
-
| --------- | -------- |
|
|
10073
|
-
| `data` | `string` |
|
|
10074
|
-
|
|
10075
|
-
##### Returns
|
|
10076
|
-
|
|
10077
|
-
`void`
|
|
10078
|
-
|
|
10079
|
-
##### Inherited from
|
|
10080
|
-
|
|
10081
|
-
`CharacterData.appendData`
|
|
10082
|
-
|
|
10083
|
-
#### cloneNode()
|
|
10084
|
-
|
|
10085
|
-
> **cloneNode**(`deep?`): [`Node`](#node-1)
|
|
10086
|
-
|
|
10087
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:533
|
|
10088
|
-
|
|
10089
|
-
Returns a copy of node. If deep is true, the copy also includes the node's descendants.
|
|
10090
|
-
|
|
10091
|
-
##### Parameters
|
|
10092
|
-
|
|
10093
|
-
| Parameter | Type |
|
|
10094
|
-
| --------- | --------- |
|
|
10095
|
-
| `deep?` | `boolean` |
|
|
10096
|
-
|
|
10097
|
-
##### Returns
|
|
10098
|
-
|
|
10099
|
-
[`Node`](#node-1)
|
|
10100
|
-
|
|
10101
|
-
##### Throws
|
|
10102
|
-
|
|
10103
|
-
May throw a DOMException if operations within [Element#setAttributeNode](#setattributenode) or
|
|
10104
|
-
[Node#appendChild](#appendchild-8) (which are potentially invoked in this method) do not meet their
|
|
10105
|
-
specific constraints.
|
|
10106
|
-
|
|
10107
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/cloneNode)
|
|
10108
|
-
|
|
10109
|
-
##### Inherited from
|
|
10110
|
-
|
|
10111
|
-
`CharacterData.cloneNode`
|
|
10112
|
-
|
|
10113
|
-
#### compareDocumentPosition()
|
|
10114
|
-
|
|
10115
|
-
> **compareDocumentPosition**(`other`): `number`
|
|
10116
|
-
|
|
10117
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:540
|
|
10118
|
-
|
|
10119
|
-
Returns a bitmask indicating the position of other relative to node.
|
|
10120
|
-
|
|
10121
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/compareDocumentPosition)
|
|
10122
|
-
|
|
10123
|
-
##### Parameters
|
|
10124
|
-
|
|
10125
|
-
| Parameter | Type |
|
|
10126
|
-
| --------- | ----------------- |
|
|
10127
|
-
| `other` | [`Node`](#node-1) |
|
|
10128
|
-
|
|
10129
|
-
##### Returns
|
|
10130
|
-
|
|
10131
|
-
`number`
|
|
10132
|
-
|
|
10133
|
-
##### Inherited from
|
|
10134
|
-
|
|
10135
|
-
`CharacterData.compareDocumentPosition`
|
|
10136
|
-
|
|
10137
|
-
#### contains()
|
|
10138
|
-
|
|
10139
|
-
> **contains**(`other`): `boolean`
|
|
10140
|
-
|
|
10141
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:489
|
|
10142
|
-
|
|
10143
|
-
Checks whether `other` is an inclusive descendant of this node.
|
|
10144
|
-
|
|
10145
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/contains)
|
|
10146
|
-
|
|
10147
|
-
##### Parameters
|
|
10148
|
-
|
|
10149
|
-
| Parameter | Type |
|
|
10150
|
-
| --------- | ------------------------------------------ |
|
|
10151
|
-
| `other` | [`Node`](#node-1) \| `null` \| `undefined` |
|
|
10152
|
-
|
|
10153
|
-
##### Returns
|
|
10154
|
-
|
|
10155
|
-
`boolean`
|
|
10156
|
-
|
|
10157
|
-
##### Inherited from
|
|
10158
|
-
|
|
10159
|
-
`CharacterData.contains`
|
|
10160
|
-
|
|
10161
|
-
#### deleteData()
|
|
10162
|
-
|
|
10163
|
-
> **deleteData**(`offset`, `count`): `void`
|
|
10164
|
-
|
|
10165
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1026
|
|
10166
|
-
|
|
10167
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/deleteData)
|
|
10168
|
-
|
|
10169
|
-
##### Parameters
|
|
10170
|
-
|
|
10171
|
-
| Parameter | Type |
|
|
10172
|
-
| --------- | -------- |
|
|
10173
|
-
| `offset` | `number` |
|
|
10174
|
-
| `count` | `number` |
|
|
10175
|
-
|
|
10176
|
-
##### Returns
|
|
10177
|
-
|
|
10178
|
-
`void`
|
|
10179
|
-
|
|
10180
|
-
##### Inherited from
|
|
10181
|
-
|
|
10182
|
-
`CharacterData.deleteData`
|
|
10183
|
-
|
|
10184
|
-
#### getRootNode()
|
|
10185
|
-
|
|
10186
|
-
> **getRootNode**(`options`): [`Node`](#node-1)
|
|
10187
|
-
|
|
10188
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:502
|
|
10189
|
-
|
|
10190
|
-
Searches for the root node of this node.
|
|
10191
|
-
|
|
10192
|
-
**This behavior is slightly different from the one in the specs**:
|
|
10193
|
-
|
|
10194
|
-
- ignores `options.composed`, since `ShadowRoot`s are unsupported, therefore always
|
|
10195
|
-
returning root.
|
|
10196
|
-
|
|
10197
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode)
|
|
10198
|
-
|
|
10199
|
-
##### Parameters
|
|
10200
|
-
|
|
10201
|
-
| Parameter | Type |
|
|
10202
|
-
| --------- | -------------------- |
|
|
10203
|
-
| `options` | `GetRootNodeOptions` |
|
|
10204
|
-
|
|
10205
|
-
##### Returns
|
|
10206
|
-
|
|
10207
|
-
[`Node`](#node-1)
|
|
10208
|
-
|
|
10209
|
-
##### See
|
|
10210
|
-
|
|
10211
|
-
- https://dom.spec.whatwg.org/#dom-node-getrootnode
|
|
10212
|
-
- https://dom.spec.whatwg.org/#concept-shadow-including-root
|
|
10213
|
-
|
|
10214
|
-
##### Inherited from
|
|
10215
|
-
|
|
10216
|
-
`CharacterData.getRootNode`
|
|
10217
|
-
|
|
10218
|
-
#### hasChildNodes()
|
|
10219
|
-
|
|
10220
|
-
> **hasChildNodes**(): `boolean`
|
|
10221
|
-
|
|
10222
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:547
|
|
10223
|
-
|
|
10224
|
-
Returns whether node has children.
|
|
10225
|
-
|
|
10226
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/hasChildNodes)
|
|
10227
|
-
|
|
10228
|
-
##### Returns
|
|
10229
|
-
|
|
10230
|
-
`boolean`
|
|
10231
|
-
|
|
10232
|
-
##### Inherited from
|
|
10233
|
-
|
|
10234
|
-
`CharacterData.hasChildNodes`
|
|
10235
|
-
|
|
10236
|
-
#### insertBefore()
|
|
10237
|
-
|
|
10238
|
-
> **insertBefore**(`node`, `child`): [`Node`](#node-1)
|
|
10239
|
-
|
|
10240
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:550
|
|
10241
|
-
|
|
10242
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/insertBefore)
|
|
10243
|
-
|
|
10244
|
-
##### Parameters
|
|
10245
|
-
|
|
10246
|
-
| Parameter | Type |
|
|
10247
|
-
| --------- | --------------------------- |
|
|
10248
|
-
| `node` | [`Node`](#node-1) |
|
|
10249
|
-
| `child` | [`Node`](#node-1) \| `null` |
|
|
10250
|
-
|
|
10251
|
-
##### Returns
|
|
10252
|
-
|
|
10253
|
-
[`Node`](#node-1)
|
|
10254
|
-
|
|
10255
|
-
##### Inherited from
|
|
10256
|
-
|
|
10257
|
-
`CharacterData.insertBefore`
|
|
10258
|
-
|
|
10259
|
-
#### insertData()
|
|
10260
|
-
|
|
10261
|
-
> **insertData**(`offset`, `data`): `void`
|
|
10262
|
-
|
|
10263
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1028
|
|
10264
|
-
|
|
10265
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/insertData)
|
|
10266
|
-
|
|
10267
|
-
##### Parameters
|
|
10268
|
-
|
|
10269
|
-
| Parameter | Type |
|
|
10270
|
-
| --------- | -------- |
|
|
10271
|
-
| `offset` | `number` |
|
|
10272
|
-
| `data` | `string` |
|
|
10273
|
-
|
|
10274
|
-
##### Returns
|
|
10275
|
-
|
|
10276
|
-
`void`
|
|
10277
|
-
|
|
10278
|
-
##### Inherited from
|
|
10279
|
-
|
|
10280
|
-
`CharacterData.insertData`
|
|
10281
|
-
|
|
10282
|
-
#### isDefaultNamespace()
|
|
10283
|
-
|
|
10284
|
-
> **isDefaultNamespace**(`namespace`): `boolean`
|
|
10285
|
-
|
|
10286
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:553
|
|
10287
|
-
|
|
10288
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/isDefaultNamespace)
|
|
10289
|
-
|
|
10290
|
-
##### Parameters
|
|
10291
|
-
|
|
10292
|
-
| Parameter | Type |
|
|
10293
|
-
| ----------- | ------------------ |
|
|
10294
|
-
| `namespace` | `string` \| `null` |
|
|
10295
|
-
|
|
10296
|
-
##### Returns
|
|
10297
|
-
|
|
10298
|
-
`boolean`
|
|
10299
|
-
|
|
10300
|
-
##### Inherited from
|
|
10301
|
-
|
|
10302
|
-
`CharacterData.isDefaultNamespace`
|
|
10303
|
-
|
|
10304
|
-
#### isEqualNode()
|
|
10305
|
-
|
|
10306
|
-
> **isEqualNode**(`other`): `boolean`
|
|
10307
|
-
|
|
10308
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:514
|
|
10309
|
-
|
|
10310
|
-
Checks whether the given node is equal to this node.
|
|
10311
|
-
|
|
10312
|
-
Two nodes are equal when they have the same type, defining characteristics (for the type),
|
|
10313
|
-
and the same `childNodes`. The comparison is iterative to avoid stack overflows on deeply
|
|
10314
|
-
nested trees. `Attribute` nodes of each `Element` pair are also compared iteratively.
|
|
10315
|
-
|
|
10316
|
-
##### Parameters
|
|
10317
|
-
|
|
10318
|
-
| Parameter | Type |
|
|
10319
|
-
| --------- | ----------------- |
|
|
10320
|
-
| `other` | [`Node`](#node-1) |
|
|
10321
|
-
|
|
10322
|
-
##### Returns
|
|
10323
|
-
|
|
10324
|
-
`boolean`
|
|
10325
|
-
|
|
10326
|
-
##### See
|
|
10327
|
-
|
|
10328
|
-
- [https://dom.spec.whatwg.org/#concept-node-equals](https://dom.spec.whatwg.org/#concept-node-equals)
|
|
10329
|
-
- [https://developer.mozilla.org/en-US/docs/Web/API/Node/isEqualNode](https://developer.mozilla.org/en-US/docs/Web/API/Node/isEqualNode)
|
|
10330
|
-
|
|
10331
|
-
##### Inherited from
|
|
10332
|
-
|
|
10333
|
-
`CharacterData.isEqualNode`
|
|
10334
|
-
|
|
10335
|
-
#### isSameNode()
|
|
10336
|
-
|
|
10337
|
-
> **isSameNode**(`other`): `boolean`
|
|
10338
|
-
|
|
10339
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:521
|
|
10340
|
-
|
|
10341
|
-
Checks whether the given node is this node.
|
|
10342
|
-
|
|
10343
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/isSameNode)
|
|
10344
|
-
|
|
10345
|
-
##### Parameters
|
|
10346
|
-
|
|
10347
|
-
| Parameter | Type |
|
|
10348
|
-
| --------- | ----------------- |
|
|
10349
|
-
| `other` | [`Node`](#node-1) |
|
|
10350
|
-
|
|
10351
|
-
##### Returns
|
|
10352
|
-
|
|
10353
|
-
`boolean`
|
|
10354
|
-
|
|
10355
|
-
##### Inherited from
|
|
10356
|
-
|
|
10357
|
-
`CharacterData.isSameNode`
|
|
10358
|
-
|
|
10359
|
-
#### ~~isSupported()~~
|
|
10360
|
-
|
|
10361
|
-
> **isSupported**(`feature`, `version`): `true`
|
|
10362
|
-
|
|
10363
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:568
|
|
10364
|
-
|
|
10365
|
-
Checks whether the DOM implementation implements a specific feature and its version.
|
|
10366
|
-
|
|
10367
|
-
##### Parameters
|
|
10368
|
-
|
|
10369
|
-
| Parameter | Type | Description |
|
|
10370
|
-
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
10371
|
-
| `feature` | `string` | The package name of the feature to test. This is the same name that can be passed to the method `hasFeature` on `DOMImplementation`. |
|
|
10372
|
-
| `version` | `string` | This is the version number of the package name to test. |
|
|
10373
|
-
|
|
10374
|
-
##### Returns
|
|
10375
|
-
|
|
10376
|
-
`true`
|
|
10377
|
-
|
|
10378
|
-
##### Deprecated
|
|
10379
|
-
|
|
10380
|
-
Since `DOMImplementation.hasFeature` is deprecated and always returns true.
|
|
10381
|
-
|
|
10382
|
-
##### Since
|
|
10383
|
-
|
|
10384
|
-
Introduced in DOM Level 2
|
|
10385
|
-
|
|
10386
|
-
##### See
|
|
10387
|
-
|
|
10388
|
-
DOMImplementation.hasFeature
|
|
10389
|
-
|
|
10390
|
-
##### Inherited from
|
|
10391
|
-
|
|
10392
|
-
`CharacterData.isSupported`
|
|
10393
|
-
|
|
10394
|
-
#### lookupNamespaceURI()
|
|
10395
|
-
|
|
10396
|
-
> **lookupNamespaceURI**(`prefix`): `string` \| `null`
|
|
10397
|
-
|
|
10398
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:571
|
|
10399
|
-
|
|
10400
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupNamespaceURI)
|
|
10401
|
-
|
|
10402
|
-
##### Parameters
|
|
10403
|
-
|
|
10404
|
-
| Parameter | Type |
|
|
10405
|
-
| --------- | ------------------ |
|
|
10406
|
-
| `prefix` | `string` \| `null` |
|
|
10407
|
-
|
|
10408
|
-
##### Returns
|
|
10409
|
-
|
|
10410
|
-
`string` \| `null`
|
|
10411
|
-
|
|
10412
|
-
##### Inherited from
|
|
10413
|
-
|
|
10414
|
-
`CharacterData.lookupNamespaceURI`
|
|
10415
|
-
|
|
10416
|
-
#### lookupPrefix()
|
|
10417
|
-
|
|
10418
|
-
> **lookupPrefix**(`namespace`): `string` \| `null`
|
|
10419
|
-
|
|
10420
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:574
|
|
10421
|
-
|
|
10422
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupPrefix)
|
|
10423
|
-
|
|
10424
|
-
##### Parameters
|
|
10425
|
-
|
|
10426
|
-
| Parameter | Type |
|
|
10427
|
-
| ----------- | ------------------ |
|
|
10428
|
-
| `namespace` | `string` \| `null` |
|
|
10429
|
-
|
|
10430
|
-
##### Returns
|
|
10431
|
-
|
|
10432
|
-
`string` \| `null`
|
|
10433
|
-
|
|
10434
|
-
##### Inherited from
|
|
10435
|
-
|
|
10436
|
-
`CharacterData.lookupPrefix`
|
|
10437
|
-
|
|
10438
|
-
#### normalize()
|
|
10439
|
-
|
|
10440
|
-
> **normalize**(): `void`
|
|
10441
|
-
|
|
10442
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:582
|
|
10443
|
-
|
|
10444
|
-
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous
|
|
10445
|
-
exclusive Text nodes into the first of their nodes.
|
|
10446
|
-
|
|
10447
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/normalize)
|
|
10448
|
-
|
|
10449
|
-
##### Returns
|
|
10450
|
-
|
|
10451
|
-
`void`
|
|
10452
|
-
|
|
10453
|
-
##### Inherited from
|
|
10454
|
-
|
|
10455
|
-
`CharacterData.normalize`
|
|
10456
|
-
|
|
10457
|
-
#### removeChild()
|
|
10458
|
-
|
|
10459
|
-
> **removeChild**(`child`): [`Node`](#node-1)
|
|
10460
|
-
|
|
10461
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:585
|
|
10462
|
-
|
|
10463
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/removeChild)
|
|
10464
|
-
|
|
10465
|
-
##### Parameters
|
|
10466
|
-
|
|
10467
|
-
| Parameter | Type |
|
|
10468
|
-
| --------- | ----------------- |
|
|
10469
|
-
| `child` | [`Node`](#node-1) |
|
|
10470
|
-
|
|
10471
|
-
##### Returns
|
|
10472
|
-
|
|
10473
|
-
[`Node`](#node-1)
|
|
10474
|
-
|
|
10475
|
-
##### Inherited from
|
|
10476
|
-
|
|
10477
|
-
`CharacterData.removeChild`
|
|
10478
|
-
|
|
10479
|
-
#### replaceChild()
|
|
10480
|
-
|
|
10481
|
-
> **replaceChild**(`node`, `child`): [`Node`](#node-1)
|
|
10482
|
-
|
|
10483
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:588
|
|
10484
|
-
|
|
10485
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/replaceChild)
|
|
10486
|
-
|
|
10487
|
-
##### Parameters
|
|
10488
|
-
|
|
10489
|
-
| Parameter | Type |
|
|
10490
|
-
| --------- | ----------------- |
|
|
10491
|
-
| `node` | [`Node`](#node-1) |
|
|
10492
|
-
| `child` | [`Node`](#node-1) |
|
|
10493
|
-
|
|
10494
|
-
##### Returns
|
|
10495
|
-
|
|
10496
|
-
[`Node`](#node-1)
|
|
10497
|
-
|
|
10498
|
-
##### Inherited from
|
|
10499
|
-
|
|
10500
|
-
`CharacterData.replaceChild`
|
|
10501
|
-
|
|
10502
|
-
#### replaceData()
|
|
10503
|
-
|
|
10504
|
-
> **replaceData**(`offset`, `count`, `data`): `void`
|
|
10505
|
-
|
|
10506
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1030
|
|
10507
|
-
|
|
10508
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/replaceData)
|
|
10509
|
-
|
|
10510
|
-
##### Parameters
|
|
10511
|
-
|
|
10512
|
-
| Parameter | Type |
|
|
10513
|
-
| --------- | -------- |
|
|
10514
|
-
| `offset` | `number` |
|
|
10515
|
-
| `count` | `number` |
|
|
10516
|
-
| `data` | `string` |
|
|
10517
|
-
|
|
10518
|
-
##### Returns
|
|
10519
|
-
|
|
10520
|
-
`void`
|
|
10521
|
-
|
|
10522
|
-
##### Inherited from
|
|
10523
|
-
|
|
10524
|
-
`CharacterData.replaceData`
|
|
10525
|
-
|
|
10526
|
-
#### splitText()
|
|
10527
|
-
|
|
10528
|
-
> **splitText**(`offset`): [`Text`](#text-1)
|
|
10529
|
-
|
|
10530
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1059
|
|
10531
|
-
|
|
10532
|
-
Splits data at the given offset and returns the remainder as Text node.
|
|
10533
|
-
|
|
10534
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Text/splitText)
|
|
10535
|
-
|
|
10536
|
-
##### Parameters
|
|
10537
|
-
|
|
10538
|
-
| Parameter | Type |
|
|
10539
|
-
| --------- | -------- |
|
|
10540
|
-
| `offset` | `number` |
|
|
10541
|
-
|
|
10542
|
-
##### Returns
|
|
10543
|
-
|
|
10544
|
-
[`Text`](#text-1)
|
|
10545
|
-
|
|
10546
|
-
#### substringData()
|
|
10547
|
-
|
|
10548
|
-
> **substringData**(`offset`, `count`): `string`
|
|
10549
|
-
|
|
10550
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1032
|
|
10551
|
-
|
|
10552
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/substringData)
|
|
10553
|
-
|
|
10554
|
-
##### Parameters
|
|
10555
|
-
|
|
10556
|
-
| Parameter | Type |
|
|
10557
|
-
| --------- | -------- |
|
|
10558
|
-
| `offset` | `number` |
|
|
10559
|
-
| `count` | `number` |
|
|
10560
|
-
|
|
10561
|
-
##### Returns
|
|
10562
|
-
|
|
10563
|
-
`string`
|
|
10564
|
-
|
|
10565
|
-
##### Inherited from
|
|
10566
|
-
|
|
10567
|
-
`CharacterData.substringData`
|
|
10568
|
-
|
|
10569
|
-
---
|
|
10570
|
-
|
|
10571
|
-
## AdapterOptions\<A\>
|
|
10572
|
-
|
|
10573
|
-
> **AdapterOptions**\<`A`\> = `A` _extends_ [`EpubStorageAdapterClass`](#epubstorageadapterclass)\<infer Opts\> ? `Opts` : `object`
|
|
10574
|
-
|
|
10575
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L110)
|
|
10576
|
-
|
|
10577
|
-
### Type Parameters
|
|
10578
|
-
|
|
10579
|
-
| Type Parameter |
|
|
10580
|
-
| -------------- |
|
|
10581
|
-
| `A` |
|
|
10582
|
-
|
|
10583
|
-
---
|
|
10584
|
-
|
|
10585
|
-
## ArchiveSource
|
|
10586
|
-
|
|
10587
|
-
> **ArchiveSource** = `string` \| `Uint8Array` \| `Blob`
|
|
10588
|
-
|
|
10589
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:12](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L12)
|
|
10590
|
-
|
|
10591
|
-
---
|
|
10592
|
-
|
|
10593
|
-
## Attr
|
|
10594
|
-
|
|
10595
|
-
> **Attr** = `InstanceOf`\<[`Attr`](#attr-1)\>
|
|
10596
|
-
|
|
10597
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:664
|
|
10598
|
-
|
|
10599
|
-
A DOM element's attribute as an object. In most DOM methods, you will probably directly
|
|
10600
|
-
retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g.,
|
|
10601
|
-
Element.getAttributeNode()) or means of iterating give Attr types.
|
|
10602
|
-
|
|
10603
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Attr)
|
|
10604
|
-
|
|
10605
|
-
---
|
|
10606
|
-
|
|
10607
|
-
## Document
|
|
10608
|
-
|
|
10609
|
-
> **Document** = `InstanceOf`\<[`Document`](#document-1)\>
|
|
10610
|
-
|
|
10611
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1188
|
|
10612
|
-
|
|
10613
|
-
---
|
|
10614
|
-
|
|
10615
|
-
## DocumentType
|
|
10616
|
-
|
|
10617
|
-
> **DocumentType** = `InstanceOf`\<`DocumentFragment`\>
|
|
10618
|
-
|
|
10619
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1431
|
|
10620
|
-
|
|
10621
|
-
---
|
|
10622
|
-
|
|
10623
|
-
## Element
|
|
10624
|
-
|
|
10625
|
-
> **Element** = `InstanceOf`\<[`Element`](#element-1)\>
|
|
10626
|
-
|
|
10627
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:842
|
|
10628
|
-
|
|
10629
|
-
Element is the most general base class from which all objects in a Document inherit. It only
|
|
10630
|
-
has methods and properties common to all kinds of elements. More specific classes inherit from
|
|
10631
|
-
Element.
|
|
10632
|
-
|
|
10633
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element)
|
|
10634
|
-
|
|
10635
|
-
---
|
|
10636
|
-
|
|
10637
|
-
## EpubInstanceFor\<A\>
|
|
10638
|
-
|
|
10639
|
-
> **EpubInstanceFor**\<`A`\> = `A`\[`"capabilities"`\]\[`"writable"`\] _extends_ `true` ? [`Epub`](#epub) : [`EpubReader`](#epubreader)
|
|
10640
|
-
|
|
10641
|
-
Defined in: [libraries/epub/src/index.tsx:3328](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3328)
|
|
10642
|
-
|
|
10643
|
-
Resolves to [Epub](#epub) for writable adapters, [EpubReader](#epubreader) for read-only ones.
|
|
10644
|
-
|
|
10645
|
-
The conditional pivots on `capabilities.writable`, which must be a literal
|
|
10646
|
-
`true`/`false` on the adapter class (use `as const`) for inference to work.
|
|
10647
|
-
|
|
10648
|
-
### Type Parameters
|
|
10649
|
-
|
|
10650
|
-
| Type Parameter |
|
|
10651
|
-
| ------------------------------------------------------------------- |
|
|
10652
|
-
| `A` _extends_ [`EpubStorageAdapterClass`](#epubstorageadapterclass) |
|
|
10653
|
-
|
|
10654
|
-
---
|
|
10655
|
-
|
|
10656
|
-
## EpubMetadata
|
|
10657
|
-
|
|
10658
|
-
> **EpubMetadata** = [`MetadataEntry`](#metadataentry)[]
|
|
10659
|
-
|
|
10660
|
-
Defined in: [libraries/epub/src/index.tsx:124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L124)
|
|
10661
|
-
|
|
10662
|
-
---
|
|
10663
|
-
|
|
10664
|
-
## EpubReader
|
|
10665
|
-
|
|
10666
|
-
> **EpubReader** = `Pick`\<[`Epub`](#epub), `"storage"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"resolveHref"` \| `"readFileContents"` \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"discardAndClose"` \| `Extract`\<keyof [`Epub`](#epub), `` `get${string}` ``\>\> & `Disposable`
|
|
10667
|
-
|
|
10668
|
-
Defined in: [libraries/epub/src/index.tsx:222](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L222)
|
|
10669
|
-
|
|
10670
|
-
Read-only view of an EPUB
|
|
10671
|
-
Returned by Epub.using(MemoryAdapter).from(...) and by Epub.from(path, { readonly: true })
|
|
10672
|
-
|
|
10673
|
-
---
|
|
10674
|
-
|
|
10675
|
-
## EpubStorageKind
|
|
10676
|
-
|
|
10677
|
-
> **EpubStorageKind** = `"tmp-dir"` \| `"in-memory"` \| `string` & `object`
|
|
10678
|
-
|
|
10679
|
-
Defined in: [libraries/epub/src/adapters/interface.ts:10](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L10)
|
|
10680
|
-
|
|
10681
|
-
Pluggable storage backend for an Epub instance
|
|
10682
|
-
|
|
10683
|
-
Built-in adapters:
|
|
10684
|
-
|
|
10685
|
-
- [TmpFsAdapter](#tmpfsadapter) extracts the archive to a tmp directory and
|
|
10686
|
-
supports the full read/write/save/upgrade
|
|
10687
|
-
- [MemoryAdapter](#memoryadapter) keeps an in-memory zip handle and supports
|
|
10688
|
-
reads only
|
|
10689
|
-
|
|
10690
|
-
---
|
|
10691
|
-
|
|
10692
|
-
## InMemoryEpubReader
|
|
10693
|
-
|
|
10694
|
-
> **InMemoryEpubReader** = [`EpubReader`](#epubreader) & `object`
|
|
10695
|
-
|
|
10696
|
-
Defined in: [libraries/epub/src/index.tsx:240](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L240)
|
|
10697
|
-
|
|
10698
|
-
Readonly Epub-instance backed by an in-memory zip handle
|
|
10699
|
-
Returned by `Epub.using(MemoryAdapter).from(...)`
|
|
10700
|
-
|
|
10701
|
-
### Type Declaration
|
|
10702
|
-
|
|
10703
|
-
#### storage
|
|
10704
|
-
|
|
10705
|
-
> `readonly` **storage**: `"in-memory"`
|
|
10706
|
-
|
|
10707
|
-
---
|
|
10708
|
-
|
|
10709
|
-
## ManifestItem
|
|
10710
|
-
|
|
10711
|
-
> **ManifestItem** = `object`
|
|
10712
|
-
|
|
10713
|
-
Defined in: [libraries/epub/src/index.tsx:107](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L107)
|
|
10714
|
-
|
|
10715
|
-
### Properties
|
|
10716
|
-
|
|
10717
|
-
#### fallback?
|
|
10718
|
-
|
|
10719
|
-
> `optional` **fallback**: `string`
|
|
10720
|
-
|
|
10721
|
-
Defined in: [libraries/epub/src/index.tsx:112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L112)
|
|
10722
|
-
|
|
10723
|
-
#### href
|
|
10724
|
-
|
|
10725
|
-
> **href**: `string`
|
|
10726
|
-
|
|
10727
|
-
Defined in: [libraries/epub/src/index.tsx:109](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L109)
|
|
10728
|
-
|
|
10729
|
-
#### id
|
|
10730
|
-
|
|
10731
|
-
> **id**: `string`
|
|
10732
|
-
|
|
10733
|
-
Defined in: [libraries/epub/src/index.tsx:108](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L108)
|
|
10734
|
-
|
|
10735
|
-
#### mediaOverlay?
|
|
10736
|
-
|
|
10737
|
-
> `optional` **mediaOverlay**: `string`
|
|
10738
|
-
|
|
10739
|
-
Defined in: [libraries/epub/src/index.tsx:113](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L113)
|
|
10740
|
-
|
|
10741
|
-
#### mediaType?
|
|
10742
|
-
|
|
10743
|
-
> `optional` **mediaType**: `string`
|
|
10744
|
-
|
|
10745
|
-
Defined in: [libraries/epub/src/index.tsx:111](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L111)
|
|
10746
|
-
|
|
10747
|
-
#### properties?
|
|
10748
|
-
|
|
10749
|
-
> `optional` **properties**: `string`[]
|
|
10750
|
-
|
|
10751
|
-
Defined in: [libraries/epub/src/index.tsx:114](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L114)
|
|
10752
|
-
|
|
10753
|
-
#### title?
|
|
10754
|
-
|
|
10755
|
-
> `optional` **title**: `string`
|
|
10756
|
-
|
|
10757
|
-
Defined in: [libraries/epub/src/index.tsx:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L110)
|
|
10758
|
-
|
|
10759
|
-
---
|
|
10760
|
-
|
|
10761
|
-
## MetadataEntry
|
|
10762
|
-
|
|
10763
|
-
> **MetadataEntry** = `object`
|
|
10764
|
-
|
|
10765
|
-
Defined in: [libraries/epub/src/index.tsx:117](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L117)
|
|
10766
|
-
|
|
10767
|
-
### Properties
|
|
10768
|
-
|
|
10769
|
-
#### id?
|
|
10770
|
-
|
|
10771
|
-
> `optional` **id**: `string`
|
|
10772
|
-
|
|
10773
|
-
Defined in: [libraries/epub/src/index.tsx:118](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L118)
|
|
10774
|
-
|
|
10775
|
-
#### properties
|
|
10776
|
-
|
|
10777
|
-
> **properties**: `Record`\<`string`, `string`\>
|
|
10778
|
-
|
|
10779
|
-
Defined in: [libraries/epub/src/index.tsx:120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L120)
|
|
10780
|
-
|
|
10781
|
-
#### type
|
|
10782
|
-
|
|
10783
|
-
> **type**: `string`
|
|
10784
|
-
|
|
10785
|
-
Defined in: [libraries/epub/src/index.tsx:119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L119)
|
|
10786
|
-
|
|
10787
|
-
#### value
|
|
10788
|
-
|
|
10789
|
-
> **value**: `string` \| `undefined`
|
|
10790
|
-
|
|
10791
|
-
Defined in: [libraries/epub/src/index.tsx:121](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L121)
|
|
10792
|
-
|
|
10793
|
-
---
|
|
10794
|
-
|
|
10795
|
-
## NavigationList
|
|
10796
|
-
|
|
10797
|
-
> **NavigationList** = [`NavigationItem`](#navigationitem)[]
|
|
10798
|
-
|
|
10799
|
-
Defined in: [libraries/epub/src/index.tsx:196](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L196)
|
|
10800
|
-
|
|
10801
|
-
---
|
|
10802
|
-
|
|
10803
|
-
## Node
|
|
10804
|
-
|
|
10805
|
-
> **Node** = `InstanceOf`\<[`Node`](#node-1)\> & `object`
|
|
10806
|
-
|
|
10807
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:368
|
|
10808
|
-
|
|
10809
|
-
### Type Declaration
|
|
10810
|
-
|
|
10811
|
-
#### ATTRIBUTE_NODE
|
|
10812
|
-
|
|
10813
|
-
> `readonly` **ATTRIBUTE_NODE**: `2`
|
|
10814
|
-
|
|
10815
|
-
#### CDATA_SECTION_NODE
|
|
10816
|
-
|
|
10817
|
-
> `readonly` **CDATA_SECTION_NODE**: `4`
|
|
10818
|
-
|
|
10819
|
-
node is a CDATASection node.
|
|
10820
|
-
|
|
10821
|
-
#### COMMENT_NODE
|
|
10822
|
-
|
|
10823
|
-
> `readonly` **COMMENT_NODE**: `8`
|
|
10824
|
-
|
|
10825
|
-
node is a Comment node.
|
|
10826
|
-
|
|
10827
|
-
#### DOCUMENT_FRAGMENT_NODE
|
|
10828
|
-
|
|
10829
|
-
> `readonly` **DOCUMENT_FRAGMENT_NODE**: `11`
|
|
10830
|
-
|
|
10831
|
-
node is a DocumentFragment node.
|
|
10832
|
-
|
|
10833
|
-
#### DOCUMENT_NODE
|
|
10834
|
-
|
|
10835
|
-
> `readonly` **DOCUMENT_NODE**: `9`
|
|
10836
|
-
|
|
10837
|
-
node is a document.
|
|
10838
|
-
|
|
10839
|
-
#### DOCUMENT_POSITION_CONTAINED_BY
|
|
10840
|
-
|
|
10841
|
-
> `readonly` **DOCUMENT_POSITION_CONTAINED_BY**: `16`
|
|
10842
|
-
|
|
10843
|
-
Set when other is a descendant of node.
|
|
10844
|
-
|
|
10845
|
-
#### DOCUMENT_POSITION_CONTAINS
|
|
10846
|
-
|
|
10847
|
-
> `readonly` **DOCUMENT_POSITION_CONTAINS**: `8`
|
|
10848
|
-
|
|
10849
|
-
Set when other is an ancestor of node.
|
|
10850
|
-
|
|
10851
|
-
#### DOCUMENT_POSITION_DISCONNECTED
|
|
10852
|
-
|
|
10853
|
-
> `readonly` **DOCUMENT_POSITION_DISCONNECTED**: `1`
|
|
10854
|
-
|
|
10855
|
-
Set when node and other are not in the same tree.
|
|
10856
|
-
|
|
10857
|
-
#### DOCUMENT_POSITION_FOLLOWING
|
|
10858
|
-
|
|
10859
|
-
> `readonly` **DOCUMENT_POSITION_FOLLOWING**: `4`
|
|
10860
|
-
|
|
10861
|
-
Set when other is following node.
|
|
10862
|
-
|
|
10863
|
-
#### DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
|
|
10864
|
-
|
|
10865
|
-
> `readonly` **DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC**: `32`
|
|
10866
|
-
|
|
10867
|
-
#### DOCUMENT_POSITION_PRECEDING
|
|
10868
|
-
|
|
10869
|
-
> `readonly` **DOCUMENT_POSITION_PRECEDING**: `2`
|
|
10870
|
-
|
|
10871
|
-
Set when other is preceding node.
|
|
10872
|
-
|
|
10873
|
-
#### DOCUMENT_TYPE_NODE
|
|
10874
|
-
|
|
10875
|
-
> `readonly` **DOCUMENT_TYPE_NODE**: `10`
|
|
10876
|
-
|
|
10877
|
-
node is a doctype.
|
|
10878
|
-
|
|
10879
|
-
#### ELEMENT_NODE
|
|
10880
|
-
|
|
10881
|
-
> `readonly` **ELEMENT_NODE**: `1`
|
|
10882
|
-
|
|
10883
|
-
node is an element.
|
|
10884
|
-
|
|
10885
|
-
#### ENTITY_NODE
|
|
10886
|
-
|
|
10887
|
-
> `readonly` **ENTITY_NODE**: `6`
|
|
10888
|
-
|
|
10889
|
-
#### ENTITY_REFERENCE_NODE
|
|
10890
|
-
|
|
10891
|
-
> `readonly` **ENTITY_REFERENCE_NODE**: `5`
|
|
10892
|
-
|
|
10893
|
-
#### NOTATION_NODE
|
|
10894
|
-
|
|
10895
|
-
> `readonly` **NOTATION_NODE**: `12`
|
|
10896
|
-
|
|
10897
|
-
#### PROCESSING_INSTRUCTION_NODE
|
|
10898
|
-
|
|
10899
|
-
> `readonly` **PROCESSING_INSTRUCTION_NODE**: `7`
|
|
10900
|
-
|
|
10901
|
-
node is a ProcessingInstruction node.
|
|
10902
|
-
|
|
10903
|
-
#### TEXT_NODE
|
|
10904
|
-
|
|
10905
|
-
> `readonly` **TEXT_NODE**: `3`
|
|
10906
|
-
|
|
10907
|
-
node is a Text node.
|
|
10908
|
-
|
|
10909
|
-
---
|
|
10910
|
-
|
|
10911
|
-
## Text
|
|
10912
|
-
|
|
10913
|
-
> **Text** = `InstanceOf`\<[`Text`](#text-1)\>
|
|
10914
|
-
|
|
10915
|
-
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1051
|
|
10916
|
-
|
|
10917
|
-
The textual content of Element or Attr. If an element has no markup within its content, it has
|
|
10918
|
-
a single child implementing Text that contains the element's text. However, if the element
|
|
10919
|
-
contains markup, it is parsed into information items and Text nodes that form its children.
|
|
10920
|
-
|
|
10921
|
-
**This implementation differs from the specification:** not constructable,
|
|
10922
|
-
use `document.createTextNode(data)` instead.
|
|
10923
|
-
|
|
10924
|
-
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Text)
|
|
10925
|
-
|
|
10926
|
-
---
|
|
10927
|
-
|
|
10928
|
-
## XmlDiagnostic
|
|
10929
|
-
|
|
10930
|
-
> **XmlDiagnostic** = `object`
|
|
10931
|
-
|
|
10932
|
-
Defined in: [libraries/epub/src/xml.ts:233](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L233)
|
|
10933
|
-
|
|
10934
|
-
### Properties
|
|
10935
|
-
|
|
10936
|
-
#### column?
|
|
10937
|
-
|
|
10938
|
-
> `optional` **column**: `number`
|
|
10939
|
-
|
|
10940
|
-
Defined in: [libraries/epub/src/xml.ts:238](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L238)
|
|
10941
|
-
|
|
10942
|
-
#### level
|
|
10943
|
-
|
|
10944
|
-
> **level**: `"warning"` \| `"error"` \| `"fatalError"`
|
|
10945
|
-
|
|
10946
|
-
Defined in: [libraries/epub/src/xml.ts:235](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L235)
|
|
10947
|
-
|
|
10948
|
-
#### line?
|
|
10949
|
-
|
|
10950
|
-
> `optional` **line**: `number`
|
|
10951
|
-
|
|
10952
|
-
Defined in: [libraries/epub/src/xml.ts:237](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L237)
|
|
10953
|
-
|
|
10954
|
-
#### message
|
|
10955
|
-
|
|
10956
|
-
> **message**: `string`
|
|
10957
|
-
|
|
10958
|
-
Defined in: [libraries/epub/src/xml.ts:236](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L236)
|
|
10959
|
-
|
|
10960
|
-
---
|
|
10961
|
-
|
|
10962
|
-
## NS
|
|
10963
|
-
|
|
10964
|
-
> `const` **NS**: `object`
|
|
10965
|
-
|
|
10966
|
-
Defined in: [libraries/epub/src/xml.ts:283](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L283)
|
|
10967
|
-
|
|
10968
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
10969
|
-
building and inspecting XML trees directly, use these.
|
|
10970
|
-
|
|
10971
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
10972
|
-
`@xmldom/xmldom` themselves.
|
|
10973
|
-
|
|
10974
|
-
### Type Declaration
|
|
10975
|
-
|
|
10976
|
-
#### dc
|
|
10977
|
-
|
|
10978
|
-
> **dc**: `string` = `"http://purl.org/dc/elements/1.1/"`
|
|
10979
|
-
|
|
10980
|
-
#### epub
|
|
10981
|
-
|
|
10982
|
-
> **epub**: `string` = `"http://www.idpf.org/2007/ops"`
|
|
10983
|
-
|
|
10984
|
-
#### opf
|
|
10985
|
-
|
|
10986
|
-
> **opf**: `string` = `"http://www.idpf.org/2007/opf"`
|
|
10987
|
-
|
|
10988
|
-
#### xhtml
|
|
10989
|
-
|
|
10990
|
-
> **xhtml**: `string` = `"http://www.w3.org/1999/xhtml"`
|
|
10991
|
-
|
|
10992
|
-
#### xml
|
|
10993
|
-
|
|
10994
|
-
> **xml**: `string` = `"http://www.w3.org/XML/1998/namespace"`
|
|
10995
|
-
|
|
10996
|
-
#### xmlns
|
|
10997
|
-
|
|
10998
|
-
> **xmlns**: `string` = `"http://www.w3.org/2000/xmlns/"`
|
|
10999
|
-
|
|
11000
|
-
---
|
|
11001
|
-
|
|
11002
|
-
## XMLSerializer
|
|
11003
|
-
|
|
11004
|
-
> **XMLSerializer**: _typeof_ `XMLSerializer`
|
|
11005
|
-
|
|
11006
|
-
Defined in: [libraries/epub/src/xml.ts:12](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L12)
|
|
11007
|
-
|
|
11008
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11009
|
-
building and inspecting XML trees directly, use these.
|
|
11010
|
-
|
|
11011
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11012
|
-
`@xmldom/xmldom` themselves.
|
|
11013
|
-
|
|
11014
|
-
---
|
|
11015
|
-
|
|
11016
|
-
## addLinkToXhtmlHead()
|
|
11017
|
-
|
|
11018
|
-
> **addLinkToXhtmlHead**(`document`, `link`): `void`
|
|
11019
|
-
|
|
11020
|
-
Defined in: [libraries/epub/src/xml.ts:215](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L215)
|
|
11021
|
-
|
|
11022
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11023
|
-
building and inspecting XML trees directly, use these.
|
|
11024
|
-
|
|
11025
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11026
|
-
`@xmldom/xmldom` themselves.
|
|
11027
|
-
|
|
11028
|
-
### Parameters
|
|
11029
|
-
|
|
11030
|
-
| Parameter | Type |
|
|
11031
|
-
| ----------- | ---------------------------------------------------------- |
|
|
11032
|
-
| `document` | [`Document`](#document-1) |
|
|
11033
|
-
| `link` | \{ `href`: `string`; `rel`: `string`; `type`: `string`; \} |
|
|
11034
|
-
| `link.href` | `string` |
|
|
11035
|
-
| `link.rel` | `string` |
|
|
11036
|
-
| `link.type` | `string` |
|
|
11037
|
-
|
|
11038
|
-
### Returns
|
|
11039
|
-
|
|
11040
|
-
`void`
|
|
11041
|
-
|
|
11042
|
-
---
|
|
11043
|
-
|
|
11044
|
-
## adoptNamespaces()
|
|
11045
|
-
|
|
11046
|
-
> **adoptNamespaces**(`node`): `void`
|
|
11047
|
-
|
|
11048
|
-
Defined in: [libraries/epub/src/xml.ts:54](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L54)
|
|
11049
|
-
|
|
11050
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11051
|
-
building and inspecting XML trees directly, use these.
|
|
11052
|
-
|
|
11053
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11054
|
-
`@xmldom/xmldom` themselves.
|
|
11055
|
-
|
|
11056
|
-
### Parameters
|
|
11057
|
-
|
|
11058
|
-
| Parameter | Type |
|
|
11059
|
-
| --------- | ----------------------- |
|
|
11060
|
-
| `node` | [`Element`](#element-1) |
|
|
11061
|
-
|
|
11062
|
-
### Returns
|
|
11063
|
-
|
|
11064
|
-
`void`
|
|
11065
|
-
|
|
11066
|
-
### Privateremarks
|
|
11067
|
-
|
|
11068
|
-
`x()` builds elements in no namespace. That serializes correctly, because a
|
|
11069
|
-
child in no namespace inherits the enclosing default namespace on the way
|
|
11070
|
-
out, but in memory the elements report `namespaceURI === null` and so are
|
|
11071
|
-
invisible to namespace-aware queries such as `getElementsByTagNameNS`.
|
|
11072
|
-
Calling this after inserting a node makes the tree report the namespace its
|
|
11073
|
-
position implies.
|
|
11074
|
-
|
|
11075
|
-
---
|
|
11076
|
-
|
|
11077
|
-
## createDocument()
|
|
11078
|
-
|
|
11079
|
-
> **createDocument**(`namespaceUri`, `qualifiedName`, `docType?`): [`Document`](#document-1)
|
|
11080
|
-
|
|
11081
|
-
Defined in: [libraries/epub/src/xml.ts:351](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L351)
|
|
11082
|
-
|
|
11083
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11084
|
-
building and inspecting XML trees directly, use these.
|
|
11085
|
-
|
|
11086
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11087
|
-
`@xmldom/xmldom` themselves.
|
|
11088
|
-
|
|
11089
|
-
### Parameters
|
|
11090
|
-
|
|
11091
|
-
| Parameter | Type |
|
|
11092
|
-
| --------------- | ------------------------------------------- |
|
|
11093
|
-
| `namespaceUri` | `string` \| `null` |
|
|
11094
|
-
| `qualifiedName` | `string` |
|
|
11095
|
-
| `docType?` | [`DocumentType`](#documenttype-2) \| `null` |
|
|
11096
|
-
|
|
11097
|
-
### Returns
|
|
11098
|
-
|
|
11099
|
-
[`Document`](#document-1)
|
|
11100
|
-
|
|
11101
|
-
---
|
|
11102
|
-
|
|
11103
|
-
## createDocumentType()
|
|
11104
|
-
|
|
11105
|
-
> **createDocumentType**(`qualifiedName`, `publicId?`, `systemId?`): [`DocumentType`](#documenttype-2)
|
|
11106
|
-
|
|
11107
|
-
Defined in: [libraries/epub/src/xml.ts:363](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L363)
|
|
11108
|
-
|
|
11109
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11110
|
-
building and inspecting XML trees directly, use these.
|
|
11111
|
-
|
|
11112
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11113
|
-
`@xmldom/xmldom` themselves.
|
|
11114
|
-
|
|
11115
|
-
### Parameters
|
|
11116
|
-
|
|
11117
|
-
| Parameter | Type |
|
|
11118
|
-
| --------------- | -------- |
|
|
11119
|
-
| `qualifiedName` | `string` |
|
|
11120
|
-
| `publicId?` | `string` |
|
|
11121
|
-
| `systemId?` | `string` |
|
|
11122
|
-
|
|
11123
|
-
### Returns
|
|
11124
|
-
|
|
11125
|
-
[`DocumentType`](#documenttype-2)
|
|
11126
|
-
|
|
11127
|
-
---
|
|
11128
|
-
|
|
11129
|
-
## declareDefaultNamespace()
|
|
11130
|
-
|
|
11131
|
-
> **declareDefaultNamespace**(`element`, `uri`): `void`
|
|
11132
|
-
|
|
11133
|
-
Defined in: [libraries/epub/src/xml.ts:78](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L78)
|
|
11134
|
-
|
|
11135
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11136
|
-
building and inspecting XML trees directly, use these.
|
|
11137
|
-
|
|
11138
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11139
|
-
`@xmldom/xmldom` themselves.
|
|
11140
|
-
|
|
11141
|
-
### Parameters
|
|
11142
|
-
|
|
11143
|
-
| Parameter | Type |
|
|
11144
|
-
| --------- | ----------------------- |
|
|
11145
|
-
| `element` | [`Element`](#element-1) |
|
|
11146
|
-
| `uri` | `string` |
|
|
11147
|
-
|
|
11148
|
-
### Returns
|
|
11149
|
-
|
|
11150
|
-
`void`
|
|
11151
|
-
|
|
11152
|
-
---
|
|
11153
|
-
|
|
11154
|
-
## findXmlChildByName()
|
|
11155
|
-
|
|
11156
|
-
> **findXmlChildByName**(`name`, `element`, `filter?`): [`Element`](#element-1) \| `undefined`
|
|
11157
|
-
|
|
11158
|
-
Defined in: [libraries/epub/src/xml.ts:157](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L157)
|
|
11159
|
-
|
|
11160
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11161
|
-
building and inspecting XML trees directly, use these.
|
|
11162
|
-
|
|
11163
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11164
|
-
`@xmldom/xmldom` themselves.
|
|
11165
|
-
|
|
11166
|
-
### Parameters
|
|
11167
|
-
|
|
11168
|
-
| Parameter | Type |
|
|
11169
|
-
| --------- | ----------------------- |
|
|
11170
|
-
| `name` | `string` |
|
|
11171
|
-
| `element` | [`Element`](#element-1) |
|
|
11172
|
-
| `filter?` | (`node`) => `boolean` |
|
|
11173
|
-
|
|
11174
|
-
### Returns
|
|
11175
|
-
|
|
11176
|
-
[`Element`](#element-1) \| `undefined`
|
|
11177
|
-
|
|
11178
|
-
---
|
|
11179
|
-
|
|
11180
|
-
## findXmlChildByNameNS()
|
|
11181
|
-
|
|
11182
|
-
> **findXmlChildByNameNS**(`namespaceUri`, `name`, `element`, `filter?`): [`Element`](#element-1) \| `undefined`
|
|
11183
|
-
|
|
11184
|
-
Defined in: [libraries/epub/src/xml.ts:134](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L134)
|
|
11185
|
-
|
|
11186
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11187
|
-
building and inspecting XML trees directly, use these.
|
|
11188
|
-
|
|
11189
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11190
|
-
`@xmldom/xmldom` themselves.
|
|
11191
|
-
|
|
11192
|
-
### Parameters
|
|
11193
|
-
|
|
11194
|
-
| Parameter | Type |
|
|
11195
|
-
| -------------- | ----------------------- |
|
|
11196
|
-
| `namespaceUri` | `string` \| `null` |
|
|
11197
|
-
| `name` | `string` |
|
|
11198
|
-
| `element` | [`Element`](#element-1) |
|
|
11199
|
-
| `filter?` | (`node`) => `boolean` |
|
|
11200
|
-
|
|
11201
|
-
### Returns
|
|
11202
|
-
|
|
11203
|
-
[`Element`](#element-1) \| `undefined`
|
|
11204
|
-
|
|
11205
|
-
---
|
|
11206
|
-
|
|
11207
|
-
## findXmlDescendantByName()
|
|
11208
|
-
|
|
11209
|
-
> **findXmlDescendantByName**(`name`, `element`, `filter?`): [`Element`](#element-1) \| `undefined`
|
|
11210
|
-
|
|
11211
|
-
Defined in: [libraries/epub/src/xml.ts:203](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L203)
|
|
11212
|
-
|
|
11213
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11214
|
-
building and inspecting XML trees directly, use these.
|
|
11215
|
-
|
|
11216
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11217
|
-
`@xmldom/xmldom` themselves.
|
|
11218
|
-
|
|
11219
|
-
### Parameters
|
|
11220
|
-
|
|
11221
|
-
| Parameter | Type |
|
|
11222
|
-
| --------- | ----------------------- |
|
|
11223
|
-
| `name` | `string` |
|
|
11224
|
-
| `element` | [`Element`](#element-1) |
|
|
11225
|
-
| `filter?` | (`node`) => `boolean` |
|
|
11226
|
-
|
|
11227
|
-
### Returns
|
|
11228
|
-
|
|
11229
|
-
[`Element`](#element-1) \| `undefined`
|
|
11230
|
-
|
|
11231
|
-
---
|
|
11232
|
-
|
|
11233
|
-
## findXmlDescendantByNameNS()
|
|
11234
|
-
|
|
11235
|
-
> **findXmlDescendantByNameNS**(`namespaceUri`, `name`, `element`, `filter?`): [`Element`](#element-1) \| `undefined`
|
|
11236
|
-
|
|
11237
|
-
Defined in: [libraries/epub/src/xml.ts:172](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L172)
|
|
11238
|
-
|
|
11239
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11240
|
-
building and inspecting XML trees directly, use these.
|
|
11241
|
-
|
|
11242
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11243
|
-
`@xmldom/xmldom` themselves.
|
|
11244
|
-
|
|
11245
|
-
### Parameters
|
|
11246
|
-
|
|
11247
|
-
| Parameter | Type |
|
|
11248
|
-
| -------------- | ----------------------- |
|
|
11249
|
-
| `namespaceUri` | `string` \| `null` |
|
|
11250
|
-
| `name` | `string` |
|
|
11251
|
-
| `element` | [`Element`](#element-1) |
|
|
11252
|
-
| `filter?` | (`node`) => `boolean` |
|
|
11253
|
-
|
|
11254
|
-
### Returns
|
|
11255
|
-
|
|
11256
|
-
[`Element`](#element-1) \| `undefined`
|
|
11257
|
-
|
|
11258
|
-
---
|
|
11259
|
-
|
|
11260
|
-
## getXhtmlBody()
|
|
11261
|
-
|
|
11262
|
-
> **getXhtmlBody**(`document`): [`Element`](#element-1)
|
|
11263
|
-
|
|
11264
|
-
Defined in: [libraries/epub/src/xml.ts:120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L120)
|
|
11265
|
-
|
|
11266
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11267
|
-
building and inspecting XML trees directly, use these.
|
|
11268
|
-
|
|
11269
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11270
|
-
`@xmldom/xmldom` themselves.
|
|
11271
|
-
|
|
11272
|
-
### Parameters
|
|
11273
|
-
|
|
11274
|
-
| Parameter | Type |
|
|
11275
|
-
| ---------- | ------------------------- |
|
|
11276
|
-
| `document` | [`Document`](#document-1) |
|
|
11277
|
-
|
|
11278
|
-
### Returns
|
|
11279
|
-
|
|
11280
|
-
[`Element`](#element-1)
|
|
11281
|
-
|
|
11282
|
-
---
|
|
11283
|
-
|
|
11284
|
-
## insert()
|
|
11285
|
-
|
|
11286
|
-
> **insert**\<`T`\>(`parent`, `child`, `reference?`): `T`
|
|
11287
|
-
|
|
11288
|
-
Defined in: [libraries/epub/src/xml.ts:89](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L89)
|
|
11289
|
-
|
|
11290
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11291
|
-
building and inspecting XML trees directly, use these.
|
|
11292
|
-
|
|
11293
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11294
|
-
`@xmldom/xmldom` themselves.
|
|
11295
|
-
|
|
11296
|
-
### Type Parameters
|
|
11297
|
-
|
|
11298
|
-
| Type Parameter |
|
|
11299
|
-
| ------------------------------- |
|
|
11300
|
-
| `T` _extends_ [`Node`](#node-1) |
|
|
11301
|
-
|
|
11302
|
-
### Parameters
|
|
11303
|
-
|
|
11304
|
-
| Parameter | Type |
|
|
11305
|
-
| ------------ | --------------------------- |
|
|
11306
|
-
| `parent` | [`Element`](#element-1) |
|
|
11307
|
-
| `child` | `T` |
|
|
11308
|
-
| `reference?` | [`Node`](#node-1) \| `null` |
|
|
11309
|
-
|
|
11310
|
-
### Returns
|
|
11311
|
-
|
|
11312
|
-
`T`
|
|
11313
|
-
|
|
11314
|
-
---
|
|
11315
|
-
|
|
11316
|
-
## isCdata()
|
|
11317
|
-
|
|
11318
|
-
> **isCdata**(`n`): `n is CharacterData`
|
|
11319
|
-
|
|
11320
|
-
Defined in: [libraries/epub/src/xml.ts:22](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L22)
|
|
11321
|
-
|
|
11322
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11323
|
-
building and inspecting XML trees directly, use these.
|
|
11324
|
-
|
|
11325
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11326
|
-
`@xmldom/xmldom` themselves.
|
|
11327
|
-
|
|
11328
|
-
### Parameters
|
|
11329
|
-
|
|
11330
|
-
| Parameter | Type |
|
|
11331
|
-
| --------- | ----------------- |
|
|
11332
|
-
| `n` | [`Node`](#node-1) |
|
|
11333
|
-
|
|
11334
|
-
### Returns
|
|
11335
|
-
|
|
11336
|
-
`n is CharacterData`
|
|
11337
|
-
|
|
11338
|
-
---
|
|
11339
|
-
|
|
11340
|
-
## isComment()
|
|
11341
|
-
|
|
11342
|
-
> **isComment**(`n`): `n is CharacterData`
|
|
11343
|
-
|
|
11344
|
-
Defined in: [libraries/epub/src/xml.ts:26](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L26)
|
|
11345
|
-
|
|
11346
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11347
|
-
building and inspecting XML trees directly, use these.
|
|
11348
|
-
|
|
11349
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11350
|
-
`@xmldom/xmldom` themselves.
|
|
11351
|
-
|
|
11352
|
-
### Parameters
|
|
11353
|
-
|
|
11354
|
-
| Parameter | Type |
|
|
11355
|
-
| --------- | ----------------- |
|
|
11356
|
-
| `n` | [`Node`](#node-1) |
|
|
11357
|
-
|
|
11358
|
-
### Returns
|
|
11359
|
-
|
|
11360
|
-
`n is CharacterData`
|
|
11361
|
-
|
|
11362
|
-
---
|
|
11363
|
-
|
|
11364
|
-
## isElement()
|
|
11365
|
-
|
|
11366
|
-
> **isElement**(`n`): `n is Element`
|
|
11367
|
-
|
|
11368
|
-
Defined in: [libraries/epub/src/xml.ts:14](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L14)
|
|
11369
|
-
|
|
11370
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11371
|
-
building and inspecting XML trees directly, use these.
|
|
11372
|
-
|
|
11373
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11374
|
-
`@xmldom/xmldom` themselves.
|
|
11375
|
-
|
|
11376
|
-
### Parameters
|
|
11377
|
-
|
|
11378
|
-
| Parameter | Type |
|
|
11379
|
-
| --------- | ----------------- |
|
|
11380
|
-
| `n` | [`Node`](#node-1) |
|
|
11381
|
-
|
|
11382
|
-
### Returns
|
|
11383
|
-
|
|
11384
|
-
`n is Element`
|
|
11385
|
-
|
|
11386
|
-
---
|
|
11387
|
-
|
|
11388
|
-
## isText()
|
|
11389
|
-
|
|
11390
|
-
> **isText**(`n`): `n is CharacterData`
|
|
11391
|
-
|
|
11392
|
-
Defined in: [libraries/epub/src/xml.ts:18](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L18)
|
|
11393
|
-
|
|
11394
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11395
|
-
building and inspecting XML trees directly, use these.
|
|
11396
|
-
|
|
11397
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11398
|
-
`@xmldom/xmldom` themselves.
|
|
11399
|
-
|
|
11400
|
-
### Parameters
|
|
11401
|
-
|
|
11402
|
-
| Parameter | Type |
|
|
11403
|
-
| --------- | ----------------- |
|
|
11404
|
-
| `n` | [`Node`](#node-1) |
|
|
11405
|
-
|
|
11406
|
-
### Returns
|
|
11407
|
-
|
|
11408
|
-
`n is CharacterData`
|
|
11409
|
-
|
|
11410
|
-
---
|
|
11411
|
-
|
|
11412
|
-
## parse()
|
|
11413
|
-
|
|
11414
|
-
> **parse**(`xml`, `mediaType`, `onError?`): [`Document`](#document-1)
|
|
11415
|
-
|
|
11416
|
-
Defined in: [libraries/epub/src/xml.ts:241](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L241)
|
|
11417
|
-
|
|
11418
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11419
|
-
building and inspecting XML trees directly, use these.
|
|
11420
|
-
|
|
11421
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11422
|
-
`@xmldom/xmldom` themselves.
|
|
11423
|
-
|
|
11424
|
-
### Parameters
|
|
11425
|
-
|
|
11426
|
-
| Parameter | Type |
|
|
11427
|
-
| ----------- | ------------------------ |
|
|
11428
|
-
| `xml` | `string` |
|
|
11429
|
-
| `mediaType` | `string` |
|
|
11430
|
-
| `onError?` | (`diagnostic`) => `void` |
|
|
11431
|
-
|
|
11432
|
-
### Returns
|
|
11433
|
-
|
|
11434
|
-
[`Document`](#document-1)
|
|
11435
|
-
|
|
11436
|
-
---
|
|
11437
|
-
|
|
11438
|
-
## replace()
|
|
11439
|
-
|
|
11440
|
-
> **replace**\<`T`\>(`parent`, `newChild`, `oldChild`): `T`
|
|
11441
|
-
|
|
11442
|
-
Defined in: [libraries/epub/src/xml.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L105)
|
|
11443
|
-
|
|
11444
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11445
|
-
building and inspecting XML trees directly, use these.
|
|
11446
|
-
|
|
11447
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11448
|
-
`@xmldom/xmldom` themselves.
|
|
11449
|
-
|
|
11450
|
-
### Type Parameters
|
|
11451
|
-
|
|
11452
|
-
| Type Parameter |
|
|
11453
|
-
| ------------------------------- |
|
|
11454
|
-
| `T` _extends_ [`Node`](#node-1) |
|
|
11455
|
-
|
|
11456
|
-
### Parameters
|
|
11457
|
-
|
|
11458
|
-
| Parameter | Type |
|
|
11459
|
-
| ---------- | ----------------------- |
|
|
11460
|
-
| `parent` | [`Element`](#element-1) |
|
|
11461
|
-
| `newChild` | `T` |
|
|
11462
|
-
| `oldChild` | [`Node`](#node-1) |
|
|
11463
|
-
|
|
11464
|
-
### Returns
|
|
11465
|
-
|
|
11466
|
-
`T`
|
|
11467
|
-
|
|
11468
|
-
---
|
|
11469
|
-
|
|
11470
|
-
## serialize()
|
|
11471
|
-
|
|
11472
|
-
> **serialize**(`doc`, `options?`): `string`
|
|
11473
|
-
|
|
11474
|
-
Defined in: [libraries/epub/src/xml.ts:261](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L261)
|
|
11475
|
-
|
|
11476
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11477
|
-
building and inspecting XML trees directly, use these.
|
|
11478
|
-
|
|
11479
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11480
|
-
`@xmldom/xmldom` themselves.
|
|
11481
|
-
|
|
11482
|
-
### Parameters
|
|
11483
|
-
|
|
11484
|
-
| Parameter | Type |
|
|
11485
|
-
| ------------------- | ----------------------------- |
|
|
11486
|
-
| `doc` | [`Node`](#node-1) |
|
|
11487
|
-
| `options?` | \{ `validate?`: `boolean`; \} |
|
|
11488
|
-
| `options.validate?` | `boolean` |
|
|
11489
|
-
|
|
11490
|
-
### Returns
|
|
11491
|
-
|
|
11492
|
-
`string`
|
|
11493
|
-
|
|
11494
|
-
---
|
|
11495
|
-
|
|
11496
|
-
## text()
|
|
11497
|
-
|
|
11498
|
-
> **text**(`data`): [`Text`](#text-1)
|
|
11499
|
-
|
|
11500
|
-
Defined in: [libraries/epub/src/xml.ts:347](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L347)
|
|
11501
|
-
|
|
11502
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11503
|
-
building and inspecting XML trees directly, use these.
|
|
11504
|
-
|
|
11505
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11506
|
-
`@xmldom/xmldom` themselves.
|
|
11507
|
-
|
|
11508
|
-
### Parameters
|
|
11509
|
-
|
|
11510
|
-
| Parameter | Type |
|
|
11511
|
-
| --------- | -------- |
|
|
11512
|
-
| `data` | `string` |
|
|
11513
|
-
|
|
11514
|
-
### Returns
|
|
11515
|
-
|
|
11516
|
-
[`Text`](#text-1)
|
|
11517
|
-
|
|
11518
|
-
---
|
|
11519
|
-
|
|
11520
|
-
## x()
|
|
11521
|
-
|
|
11522
|
-
> **x**(`name`, `attributes?`, ...`children?`): [`Element`](#element-1)
|
|
11523
|
-
|
|
11524
|
-
Defined in: [libraries/epub/src/xml.ts:294](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L294)
|
|
11525
|
-
|
|
11526
|
-
The XML surface. Publication-level operations live on [Epub](#epub); for
|
|
11527
|
-
building and inspecting XML trees directly, use these.
|
|
11528
|
-
|
|
11529
|
-
The DOM node types are re-exported so that callers do not need to depend on
|
|
11530
|
-
`@xmldom/xmldom` themselves.
|
|
11531
|
-
|
|
11532
|
-
### Parameters
|
|
11533
|
-
|
|
11534
|
-
| Parameter | Type |
|
|
11535
|
-
| -------------- | ---------------------------------------------------------- |
|
|
11536
|
-
| `name` | `string` |
|
|
11537
|
-
| `attributes?` | `Record`\<`string`, `string` \| `undefined`\> \| `null` |
|
|
11538
|
-
| ...`children?` | (`string` \| [`Node`](#node-1) \| `null` \| `undefined`)[] |
|
|
11539
|
-
|
|
11540
|
-
### Returns
|
|
11541
|
-
|
|
11542
|
-
[`Element`](#element-1)
|
|
7980
|
+
| `version` | `string` | Thi
|