@storyteller-platform/epub 1.0.1 → 1.0.2
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 +2780 -35
- package/dist/index.js +0 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -401,7 +401,7 @@ and the adapter's capability bag)
|
|
|
401
401
|
|
|
402
402
|
> **\[dispose\]**(): `void`
|
|
403
403
|
|
|
404
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
404
|
+
Defined in: [libraries/epub/src/index.tsx:3314](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3314)
|
|
405
405
|
|
|
406
406
|
##### Returns
|
|
407
407
|
|
|
@@ -494,7 +494,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
494
494
|
|
|
495
495
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
496
496
|
|
|
497
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
497
|
+
Defined in: [libraries/epub/src/index.tsx:2913](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2913)
|
|
498
498
|
|
|
499
499
|
Create a new manifest item and write its contents to a
|
|
500
500
|
new entry.
|
|
@@ -523,7 +523,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
523
523
|
|
|
524
524
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
525
525
|
|
|
526
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
526
|
+
Defined in: [libraries/epub/src/index.tsx:2918](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2918)
|
|
527
527
|
|
|
528
528
|
Create a new manifest item and write its contents to a
|
|
529
529
|
new entry.
|
|
@@ -552,7 +552,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
552
552
|
|
|
553
553
|
> **addManifestItem**(`item`, `contents`): `Promise`\<`void`\>
|
|
554
554
|
|
|
555
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
555
|
+
Defined in: [libraries/epub/src/index.tsx:2923](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2923)
|
|
556
556
|
|
|
557
557
|
Create a new manifest item and write its contents to a
|
|
558
558
|
new entry.
|
|
@@ -580,7 +580,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
580
580
|
|
|
581
581
|
> **addMetadata**(`entry`): `Promise`\<`void`\>
|
|
582
582
|
|
|
583
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
583
|
+
Defined in: [libraries/epub/src/index.tsx:3047](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3047)
|
|
584
584
|
|
|
585
585
|
Add a new metadata entry to the Epub.
|
|
586
586
|
|
|
@@ -675,7 +675,7 @@ Defined in: [libraries/epub/src/index.tsx:489](https://gitlab.com/storyteller-pl
|
|
|
675
675
|
|
|
676
676
|
> **createXhtmlDocument**(`body`, `head?`, `language?`): `Promise`\<[`Document`](#document-1)\>
|
|
677
677
|
|
|
678
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
678
|
+
Defined in: [libraries/epub/src/index.tsx:2713](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2713)
|
|
679
679
|
|
|
680
680
|
Create a new XHTML document with the given body
|
|
681
681
|
and head.
|
|
@@ -696,7 +696,7 @@ and head.
|
|
|
696
696
|
|
|
697
697
|
> **createXmlDocument**(`root`): [`Document`](#document-1)
|
|
698
698
|
|
|
699
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
699
|
+
Defined in: [libraries/epub/src/index.tsx:2677](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2677)
|
|
700
700
|
|
|
701
701
|
Create a new XML document with the given root node.
|
|
702
702
|
|
|
@@ -714,7 +714,7 @@ Create a new XML document with the given root node.
|
|
|
714
714
|
|
|
715
715
|
> **discardAndClose**(): `void`
|
|
716
716
|
|
|
717
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
717
|
+
Defined in: [libraries/epub/src/index.tsx:3264](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3264)
|
|
718
718
|
|
|
719
719
|
##### Returns
|
|
720
720
|
|
|
@@ -892,7 +892,7 @@ include HTML markup.
|
|
|
892
892
|
|
|
893
893
|
> **getGuideEntries**(): `Promise`\<[`GuideItem`](#guideitem)[]\>
|
|
894
894
|
|
|
895
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
895
|
+
Defined in: [libraries/epub/src/index.tsx:3247](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3247)
|
|
896
896
|
|
|
897
897
|
Retrieve the guide entries from the package document.
|
|
898
898
|
|
|
@@ -1098,7 +1098,7 @@ https://www.w3.org/TR/epub-33/#sec-metadata-last-modified
|
|
|
1098
1098
|
|
|
1099
1099
|
> **getNcxTableOfContents**(): `Promise`\<[`NavigationList`](#navigationlist)\>
|
|
1100
1100
|
|
|
1101
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1101
|
+
Defined in: [libraries/epub/src/index.tsx:3171](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3171)
|
|
1102
1102
|
|
|
1103
1103
|
Parse the NCX table of contents, if one exists, and return
|
|
1104
1104
|
a tree of TocEntry nodes.
|
|
@@ -1421,7 +1421,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1421
1421
|
|
|
1422
1422
|
> **getVersion**(): `Promise`\<`string`\>
|
|
1423
1423
|
|
|
1424
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1424
|
+
Defined in: [libraries/epub/src/index.tsx:3158](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3158)
|
|
1425
1425
|
|
|
1426
1426
|
Returns the EPUB version declared on the package element.
|
|
1427
1427
|
|
|
@@ -1435,7 +1435,7 @@ Returns the EPUB version declared on the package element.
|
|
|
1435
1435
|
|
|
1436
1436
|
> **readFileContents**(`href`, `relativeTo?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1437
1437
|
|
|
1438
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1438
|
+
Defined in: [libraries/epub/src/index.tsx:2618](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2618)
|
|
1439
1439
|
|
|
1440
1440
|
Retrieve the contents of a file, given its href.
|
|
1441
1441
|
|
|
@@ -1457,7 +1457,7 @@ and an encoding parameter.
|
|
|
1457
1457
|
|
|
1458
1458
|
> **readFileContents**(`href`, `relativeTo`, `encoding`): `Promise`\<`string`\>
|
|
1459
1459
|
|
|
1460
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1460
|
+
Defined in: [libraries/epub/src/index.tsx:2619](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2619)
|
|
1461
1461
|
|
|
1462
1462
|
Retrieve the contents of a file, given its href.
|
|
1463
1463
|
|
|
@@ -1482,7 +1482,7 @@ and an encoding parameter.
|
|
|
1482
1482
|
|
|
1483
1483
|
> **readItemContents**(`id`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1484
1484
|
|
|
1485
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1485
|
+
Defined in: [libraries/epub/src/index.tsx:2651](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2651)
|
|
1486
1486
|
|
|
1487
1487
|
Retrieve the contents of a manifest item, given its id.
|
|
1488
1488
|
|
|
@@ -1504,7 +1504,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1504
1504
|
|
|
1505
1505
|
> **readItemContents**(`id`, `encoding`): `Promise`\<`string`\>
|
|
1506
1506
|
|
|
1507
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1507
|
+
Defined in: [libraries/epub/src/index.tsx:2652](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2652)
|
|
1508
1508
|
|
|
1509
1509
|
Retrieve the contents of a manifest item, given its id.
|
|
1510
1510
|
|
|
@@ -1529,7 +1529,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1529
1529
|
|
|
1530
1530
|
> **readXhtmlItemContents**(`id`, `as?`): `Promise`\<[`Document`](#document-1)\>
|
|
1531
1531
|
|
|
1532
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1532
|
+
Defined in: [libraries/epub/src/index.tsx:2763](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2763)
|
|
1533
1533
|
|
|
1534
1534
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1535
1535
|
|
|
@@ -1552,7 +1552,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1552
1552
|
|
|
1553
1553
|
> **readXhtmlItemContents**(`id`, `as`): `Promise`\<`string`\>
|
|
1554
1554
|
|
|
1555
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1555
|
+
Defined in: [libraries/epub/src/index.tsx:2764](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2764)
|
|
1556
1556
|
|
|
1557
1557
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1558
1558
|
|
|
@@ -1650,7 +1650,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1650
1650
|
|
|
1651
1651
|
> **removeManifestItem**(`id`): `Promise`\<`void`\>
|
|
1652
1652
|
|
|
1653
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1653
|
+
Defined in: [libraries/epub/src/index.tsx:2863](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2863)
|
|
1654
1654
|
|
|
1655
1655
|
##### Parameters
|
|
1656
1656
|
|
|
@@ -1666,7 +1666,7 @@ Defined in: [libraries/epub/src/index.tsx:2865](https://gitlab.com/storyteller-p
|
|
|
1666
1666
|
|
|
1667
1667
|
> **removeMetadata**(`predicate`): `Promise`\<`void`\>
|
|
1668
1668
|
|
|
1669
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1669
|
+
Defined in: [libraries/epub/src/index.tsx:3133](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3133)
|
|
1670
1670
|
|
|
1671
1671
|
Remove one or more metadata entries.
|
|
1672
1672
|
|
|
@@ -1739,7 +1739,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1739
1739
|
|
|
1740
1740
|
> **replaceMetadata**(`predicate`, `entry`): `Promise`\<`void`\>
|
|
1741
1741
|
|
|
1742
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1742
|
+
Defined in: [libraries/epub/src/index.tsx:3082](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3082)
|
|
1743
1743
|
|
|
1744
1744
|
Replace a metadata entry with a new one.
|
|
1745
1745
|
|
|
@@ -1791,7 +1791,7 @@ a navigation document, is handed back unchanged.
|
|
|
1791
1791
|
|
|
1792
1792
|
> **saveAndClose**(): `Promise`\<`void`\>
|
|
1793
1793
|
|
|
1794
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1794
|
+
Defined in: [libraries/epub/src/index.tsx:3279](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3279)
|
|
1795
1795
|
|
|
1796
1796
|
Write the current contents of the Epub to a new
|
|
1797
1797
|
EPUB archive on disk.
|
|
@@ -2143,7 +2143,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
2143
2143
|
|
|
2144
2144
|
> **updateManifestItem**(`id`, `newItem`): `Promise`\<`void`\>
|
|
2145
2145
|
|
|
2146
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2146
|
+
Defined in: [libraries/epub/src/index.tsx:2999](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2999)
|
|
2147
2147
|
|
|
2148
2148
|
Update the manifest entry for an existing item.
|
|
2149
2149
|
|
|
@@ -2194,7 +2194,7 @@ method uses a mutex to ensure that each update runs exclusively.
|
|
|
2194
2194
|
|
|
2195
2195
|
> **writeItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
2196
2196
|
|
|
2197
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2197
|
+
Defined in: [libraries/epub/src/index.tsx:2819](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2819)
|
|
2198
2198
|
|
|
2199
2199
|
Write new contents for an existing manifest item,
|
|
2200
2200
|
specified by its id.
|
|
@@ -2221,7 +2221,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
2221
2221
|
|
|
2222
2222
|
> **writeItemContents**(`id`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
2223
2223
|
|
|
2224
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2224
|
+
Defined in: [libraries/epub/src/index.tsx:2820](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2820)
|
|
2225
2225
|
|
|
2226
2226
|
Write new contents for an existing manifest item,
|
|
2227
2227
|
specified by its id.
|
|
@@ -2249,7 +2249,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
2249
2249
|
|
|
2250
2250
|
> **writeXhtmlItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
2251
2251
|
|
|
2252
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2252
|
+
Defined in: [libraries/epub/src/index.tsx:2859](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2859)
|
|
2253
2253
|
|
|
2254
2254
|
Write new contents for an existing XHTML item,
|
|
2255
2255
|
specified by its id.
|
|
@@ -2425,7 +2425,7 @@ when the archive is not a valid EPUB 3
|
|
|
2425
2425
|
|
|
2426
2426
|
> `static` **upgrade**(`path`, `options`): `Promise`\<[`Epub`](#epub)\>
|
|
2427
2427
|
|
|
2428
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2428
|
+
Defined in: [libraries/epub/src/index.tsx:3307](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3307)
|
|
2429
2429
|
|
|
2430
2430
|
Upgrade an EPUB 2 publication to EPUB 3 in place, returning a new,
|
|
2431
2431
|
valid Epub 3 instance. Equivalent to
|
|
@@ -2480,7 +2480,7 @@ using reader = await Epub.using(MemoryAdapter).from(buffer, { cache: false });
|
|
|
2480
2480
|
|
|
2481
2481
|
## EpubFactory\<A\>
|
|
2482
2482
|
|
|
2483
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2483
|
+
Defined in: [libraries/epub/src/index.tsx:3336](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3336)
|
|
2484
2484
|
|
|
2485
2485
|
Adapter-bound factory returned by [Epub.using](#using).
|
|
2486
2486
|
|
|
@@ -2501,7 +2501,7 @@ gracefully when the adapter doesn't support the operation: `create` and
|
|
|
2501
2501
|
|
|
2502
2502
|
> **new EpubFactory**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
|
|
2503
2503
|
|
|
2504
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2504
|
+
Defined in: [libraries/epub/src/index.tsx:3337](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3337)
|
|
2505
2505
|
|
|
2506
2506
|
##### Parameters
|
|
2507
2507
|
|
|
@@ -2519,7 +2519,7 @@ Defined in: [libraries/epub/src/index.tsx:3339](https://gitlab.com/storyteller-p
|
|
|
2519
2519
|
|
|
2520
2520
|
> `readonly` **adapterClass**: `A`
|
|
2521
2521
|
|
|
2522
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2522
|
+
Defined in: [libraries/epub/src/index.tsx:3337](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3337)
|
|
2523
2523
|
|
|
2524
2524
|
### Methods
|
|
2525
2525
|
|
|
@@ -2527,7 +2527,7 @@ Defined in: [libraries/epub/src/index.tsx:3339](https://gitlab.com/storyteller-p
|
|
|
2527
2527
|
|
|
2528
2528
|
> **create**(`path`, `__namedParameters`, `additionalMetadata`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
|
|
2529
2529
|
|
|
2530
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2530
|
+
Defined in: [libraries/epub/src/index.tsx:3417](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3417)
|
|
2531
2531
|
|
|
2532
2532
|
Construct a new EPUB on this factory's adapter, optionally seeded
|
|
2533
2533
|
with the provided metadata. Requires a writable adapter that
|
|
@@ -2555,7 +2555,7 @@ when the adapter is read-only or does not implement initEmpty
|
|
|
2555
2555
|
|
|
2556
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`\>
|
|
2557
2557
|
|
|
2558
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2558
|
+
Defined in: [libraries/epub/src/index.tsx:3344](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3344)
|
|
2559
2559
|
|
|
2560
2560
|
Open an existing EPUB through this factory's adapter
|
|
2561
2561
|
|
|
@@ -2578,7 +2578,7 @@ when the archive is not a valid EPUB 3
|
|
|
2578
2578
|
|
|
2579
2579
|
> **from**(`source`, `options?`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\> & `object`\>
|
|
2580
2580
|
|
|
2581
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2581
|
+
Defined in: [libraries/epub/src/index.tsx:3348](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3348)
|
|
2582
2582
|
|
|
2583
2583
|
Open an existing EPUB through this factory's adapter
|
|
2584
2584
|
|
|
@@ -2601,7 +2601,7 @@ when the archive is not a valid EPUB 3
|
|
|
2601
2601
|
|
|
2602
2602
|
> **readPackageDocumentSource**(`source`, `options`): `Promise`\<`string`\>
|
|
2603
2603
|
|
|
2604
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2604
|
+
Defined in: [libraries/epub/src/index.tsx:3391](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3391)
|
|
2605
2605
|
|
|
2606
2606
|
##### Parameters
|
|
2607
2607
|
|
|
@@ -2618,7 +2618,7 @@ Defined in: [libraries/epub/src/index.tsx:3393](https://gitlab.com/storyteller-p
|
|
|
2618
2618
|
|
|
2619
2619
|
> **upgrade**(`path`, `options`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
|
|
2620
2620
|
|
|
2621
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2621
|
+
Defined in: [libraries/epub/src/index.tsx:3544](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3544)
|
|
2622
2622
|
|
|
2623
2623
|
Upgrade an EPUB 2 publication to EPUB 3 in place using this
|
|
2624
2624
|
factory's adapter, returning a new, valid Epub 3 instance.
|
|
@@ -7977,4 +7977,2749 @@ Checks whether the DOM implementation implements a specific feature and its vers
|
|
|
7977
7977
|
| Parameter | Type | Description |
|
|
7978
7978
|
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
7979
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`. |
|
|
7980
|
-
| `version` | `string` |
|
|
7980
|
+
| `version` | `string` | This is the version number of the package name to test. |
|
|
7981
|
+
|
|
7982
|
+
##### Returns
|
|
7983
|
+
|
|
7984
|
+
`true`
|
|
7985
|
+
|
|
7986
|
+
##### Deprecated
|
|
7987
|
+
|
|
7988
|
+
Since `DOMImplementation.hasFeature` is deprecated and always returns true.
|
|
7989
|
+
|
|
7990
|
+
##### Since
|
|
7991
|
+
|
|
7992
|
+
Introduced in DOM Level 2
|
|
7993
|
+
|
|
7994
|
+
##### See
|
|
7995
|
+
|
|
7996
|
+
DOMImplementation.hasFeature
|
|
7997
|
+
|
|
7998
|
+
##### Inherited from
|
|
7999
|
+
|
|
8000
|
+
`Node.isSupported`
|
|
8001
|
+
|
|
8002
|
+
#### lookupNamespaceURI()
|
|
8003
|
+
|
|
8004
|
+
> **lookupNamespaceURI**(`prefix`): `string` \| `null`
|
|
8005
|
+
|
|
8006
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:571
|
|
8007
|
+
|
|
8008
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupNamespaceURI)
|
|
8009
|
+
|
|
8010
|
+
##### Parameters
|
|
8011
|
+
|
|
8012
|
+
| Parameter | Type |
|
|
8013
|
+
| --------- | ------------------ |
|
|
8014
|
+
| `prefix` | `string` \| `null` |
|
|
8015
|
+
|
|
8016
|
+
##### Returns
|
|
8017
|
+
|
|
8018
|
+
`string` \| `null`
|
|
8019
|
+
|
|
8020
|
+
##### Inherited from
|
|
8021
|
+
|
|
8022
|
+
`Node.lookupNamespaceURI`
|
|
8023
|
+
|
|
8024
|
+
#### lookupPrefix()
|
|
8025
|
+
|
|
8026
|
+
> **lookupPrefix**(`namespace`): `string` \| `null`
|
|
8027
|
+
|
|
8028
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:574
|
|
8029
|
+
|
|
8030
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupPrefix)
|
|
8031
|
+
|
|
8032
|
+
##### Parameters
|
|
8033
|
+
|
|
8034
|
+
| Parameter | Type |
|
|
8035
|
+
| ----------- | ------------------ |
|
|
8036
|
+
| `namespace` | `string` \| `null` |
|
|
8037
|
+
|
|
8038
|
+
##### Returns
|
|
8039
|
+
|
|
8040
|
+
`string` \| `null`
|
|
8041
|
+
|
|
8042
|
+
##### Inherited from
|
|
8043
|
+
|
|
8044
|
+
`Node.lookupPrefix`
|
|
8045
|
+
|
|
8046
|
+
#### normalize()
|
|
8047
|
+
|
|
8048
|
+
> **normalize**(): `void`
|
|
8049
|
+
|
|
8050
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:582
|
|
8051
|
+
|
|
8052
|
+
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous
|
|
8053
|
+
exclusive Text nodes into the first of their nodes.
|
|
8054
|
+
|
|
8055
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/normalize)
|
|
8056
|
+
|
|
8057
|
+
##### Returns
|
|
8058
|
+
|
|
8059
|
+
`void`
|
|
8060
|
+
|
|
8061
|
+
##### Inherited from
|
|
8062
|
+
|
|
8063
|
+
`Node.normalize`
|
|
8064
|
+
|
|
8065
|
+
#### removeAttribute()
|
|
8066
|
+
|
|
8067
|
+
> **removeAttribute**(`qualifiedName`): `void`
|
|
8068
|
+
|
|
8069
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:969
|
|
8070
|
+
|
|
8071
|
+
Removes element's first attribute whose qualified name is qualifiedName.
|
|
8072
|
+
|
|
8073
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttribute)
|
|
8074
|
+
|
|
8075
|
+
##### Parameters
|
|
8076
|
+
|
|
8077
|
+
| Parameter | Type |
|
|
8078
|
+
| --------------- | -------- |
|
|
8079
|
+
| `qualifiedName` | `string` |
|
|
8080
|
+
|
|
8081
|
+
##### Returns
|
|
8082
|
+
|
|
8083
|
+
`void`
|
|
8084
|
+
|
|
8085
|
+
#### removeAttributeNode()
|
|
8086
|
+
|
|
8087
|
+
> **removeAttributeNode**(`attr`): [`Attr`](#attr-1)
|
|
8088
|
+
|
|
8089
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:977
|
|
8090
|
+
|
|
8091
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNode)
|
|
8092
|
+
|
|
8093
|
+
##### Parameters
|
|
8094
|
+
|
|
8095
|
+
| Parameter | Type |
|
|
8096
|
+
| --------- | ----------------- |
|
|
8097
|
+
| `attr` | [`Attr`](#attr-1) |
|
|
8098
|
+
|
|
8099
|
+
##### Returns
|
|
8100
|
+
|
|
8101
|
+
[`Attr`](#attr-1)
|
|
8102
|
+
|
|
8103
|
+
#### removeAttributeNS()
|
|
8104
|
+
|
|
8105
|
+
> **removeAttributeNS**(`namespace`, `localName`): `void`
|
|
8106
|
+
|
|
8107
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:975
|
|
8108
|
+
|
|
8109
|
+
Removes element's attribute whose namespace is namespace and local name is localName.
|
|
8110
|
+
|
|
8111
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNS)
|
|
8112
|
+
|
|
8113
|
+
##### Parameters
|
|
8114
|
+
|
|
8115
|
+
| Parameter | Type |
|
|
8116
|
+
| ----------- | ------------------ |
|
|
8117
|
+
| `namespace` | `string` \| `null` |
|
|
8118
|
+
| `localName` | `string` |
|
|
8119
|
+
|
|
8120
|
+
##### Returns
|
|
8121
|
+
|
|
8122
|
+
`void`
|
|
8123
|
+
|
|
8124
|
+
#### removeChild()
|
|
8125
|
+
|
|
8126
|
+
> **removeChild**(`child`): [`Node`](#node-1)
|
|
8127
|
+
|
|
8128
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:585
|
|
8129
|
+
|
|
8130
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/removeChild)
|
|
8131
|
+
|
|
8132
|
+
##### Parameters
|
|
8133
|
+
|
|
8134
|
+
| Parameter | Type |
|
|
8135
|
+
| --------- | ----------------- |
|
|
8136
|
+
| `child` | [`Node`](#node-1) |
|
|
8137
|
+
|
|
8138
|
+
##### Returns
|
|
8139
|
+
|
|
8140
|
+
[`Node`](#node-1)
|
|
8141
|
+
|
|
8142
|
+
##### Inherited from
|
|
8143
|
+
|
|
8144
|
+
`Node.removeChild`
|
|
8145
|
+
|
|
8146
|
+
#### replaceChild()
|
|
8147
|
+
|
|
8148
|
+
> **replaceChild**(`node`, `child`): [`Node`](#node-1)
|
|
8149
|
+
|
|
8150
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:588
|
|
8151
|
+
|
|
8152
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/replaceChild)
|
|
8153
|
+
|
|
8154
|
+
##### Parameters
|
|
8155
|
+
|
|
8156
|
+
| Parameter | Type |
|
|
8157
|
+
| --------- | ----------------- |
|
|
8158
|
+
| `node` | [`Node`](#node-1) |
|
|
8159
|
+
| `child` | [`Node`](#node-1) |
|
|
8160
|
+
|
|
8161
|
+
##### Returns
|
|
8162
|
+
|
|
8163
|
+
[`Node`](#node-1)
|
|
8164
|
+
|
|
8165
|
+
##### Inherited from
|
|
8166
|
+
|
|
8167
|
+
`Node.replaceChild`
|
|
8168
|
+
|
|
8169
|
+
#### setAttribute()
|
|
8170
|
+
|
|
8171
|
+
> **setAttribute**(`qualifiedName`, `value`): `void`
|
|
8172
|
+
|
|
8173
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:983
|
|
8174
|
+
|
|
8175
|
+
Sets the value of element's first attribute whose qualified name is qualifiedName to value.
|
|
8176
|
+
|
|
8177
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttribute)
|
|
8178
|
+
|
|
8179
|
+
##### Parameters
|
|
8180
|
+
|
|
8181
|
+
| Parameter | Type |
|
|
8182
|
+
| --------------- | -------- |
|
|
8183
|
+
| `qualifiedName` | `string` |
|
|
8184
|
+
| `value` | `string` |
|
|
8185
|
+
|
|
8186
|
+
##### Returns
|
|
8187
|
+
|
|
8188
|
+
`void`
|
|
8189
|
+
|
|
8190
|
+
#### setAttributeNode()
|
|
8191
|
+
|
|
8192
|
+
> **setAttributeNode**(`attr`): [`Attr`](#attr-1) \| `null`
|
|
8193
|
+
|
|
8194
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:996
|
|
8195
|
+
|
|
8196
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNode)
|
|
8197
|
+
|
|
8198
|
+
##### Parameters
|
|
8199
|
+
|
|
8200
|
+
| Parameter | Type |
|
|
8201
|
+
| --------- | ----------------- |
|
|
8202
|
+
| `attr` | [`Attr`](#attr-1) |
|
|
8203
|
+
|
|
8204
|
+
##### Returns
|
|
8205
|
+
|
|
8206
|
+
[`Attr`](#attr-1) \| `null`
|
|
8207
|
+
|
|
8208
|
+
#### setAttributeNodeNS()
|
|
8209
|
+
|
|
8210
|
+
> **setAttributeNodeNS**(`attr`): [`Attr`](#attr-1) \| `null`
|
|
8211
|
+
|
|
8212
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:998
|
|
8213
|
+
|
|
8214
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)
|
|
8215
|
+
|
|
8216
|
+
##### Parameters
|
|
8217
|
+
|
|
8218
|
+
| Parameter | Type |
|
|
8219
|
+
| --------- | ----------------- |
|
|
8220
|
+
| `attr` | [`Attr`](#attr-1) |
|
|
8221
|
+
|
|
8222
|
+
##### Returns
|
|
8223
|
+
|
|
8224
|
+
[`Attr`](#attr-1) \| `null`
|
|
8225
|
+
|
|
8226
|
+
#### setAttributeNS()
|
|
8227
|
+
|
|
8228
|
+
> **setAttributeNS**(`namespace`, `qualifiedName`, `value`): `void`
|
|
8229
|
+
|
|
8230
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:990
|
|
8231
|
+
|
|
8232
|
+
Sets the value of element's attribute whose namespace is namespace and local name is
|
|
8233
|
+
localName to value.
|
|
8234
|
+
|
|
8235
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNS)
|
|
8236
|
+
|
|
8237
|
+
##### Parameters
|
|
8238
|
+
|
|
8239
|
+
| Parameter | Type |
|
|
8240
|
+
| --------------- | ------------------ |
|
|
8241
|
+
| `namespace` | `string` \| `null` |
|
|
8242
|
+
| `qualifiedName` | `string` |
|
|
8243
|
+
| `value` | `string` |
|
|
8244
|
+
|
|
8245
|
+
##### Returns
|
|
8246
|
+
|
|
8247
|
+
`void`
|
|
8248
|
+
|
|
8249
|
+
---
|
|
8250
|
+
|
|
8251
|
+
## Epub2UpgradeOptions
|
|
8252
|
+
|
|
8253
|
+
Defined in: [libraries/epub/src/upgrade.tsx:76](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L76)
|
|
8254
|
+
|
|
8255
|
+
### Properties
|
|
8256
|
+
|
|
8257
|
+
#### outputPath?
|
|
8258
|
+
|
|
8259
|
+
> `optional` **outputPath**: `string`
|
|
8260
|
+
|
|
8261
|
+
Defined in: [libraries/epub/src/upgrade.tsx:80](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L80)
|
|
8262
|
+
|
|
8263
|
+
The path to the output file. If provided, the input file will be copied to the output path.
|
|
8264
|
+
|
|
8265
|
+
#### removeNcx?
|
|
8266
|
+
|
|
8267
|
+
> `optional` **removeNcx**: `boolean`
|
|
8268
|
+
|
|
8269
|
+
Defined in: [libraries/epub/src/upgrade.tsx:84](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L84)
|
|
8270
|
+
|
|
8271
|
+
Whether to remove the NCX file, as it's technically optional in EPUB 3.
|
|
8272
|
+
|
|
8273
|
+
---
|
|
8274
|
+
|
|
8275
|
+
## EpubIdentifier
|
|
8276
|
+
|
|
8277
|
+
Defined in: [libraries/epub/src/index.tsx:132](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L132)
|
|
8278
|
+
|
|
8279
|
+
### Properties
|
|
8280
|
+
|
|
8281
|
+
#### id?
|
|
8282
|
+
|
|
8283
|
+
> `optional` **id**: `string`
|
|
8284
|
+
|
|
8285
|
+
Defined in: [libraries/epub/src/index.tsx:134](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L134)
|
|
8286
|
+
|
|
8287
|
+
#### identifierType?
|
|
8288
|
+
|
|
8289
|
+
> `optional` **identifierType**: `string`
|
|
8290
|
+
|
|
8291
|
+
Defined in: [libraries/epub/src/index.tsx:136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L136)
|
|
8292
|
+
|
|
8293
|
+
the value of a refining `identifier-type` meta, if present
|
|
8294
|
+
|
|
8295
|
+
#### scheme?
|
|
8296
|
+
|
|
8297
|
+
> `optional` **scheme**: `string`
|
|
8298
|
+
|
|
8299
|
+
Defined in: [libraries/epub/src/index.tsx:138](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L138)
|
|
8300
|
+
|
|
8301
|
+
the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
|
|
8302
|
+
|
|
8303
|
+
#### value
|
|
8304
|
+
|
|
8305
|
+
> **value**: `string`
|
|
8306
|
+
|
|
8307
|
+
Defined in: [libraries/epub/src/index.tsx:133](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L133)
|
|
8308
|
+
|
|
8309
|
+
---
|
|
8310
|
+
|
|
8311
|
+
## EpubListEntry
|
|
8312
|
+
|
|
8313
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:39](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L39)
|
|
8314
|
+
|
|
8315
|
+
### Properties
|
|
8316
|
+
|
|
8317
|
+
#### absolutePath
|
|
8318
|
+
|
|
8319
|
+
> **absolutePath**: `string`
|
|
8320
|
+
|
|
8321
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:41](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L41)
|
|
8322
|
+
|
|
8323
|
+
location the adapter can read the entry back from, in whatever form it stores
|
|
8324
|
+
|
|
8325
|
+
#### relativePath
|
|
8326
|
+
|
|
8327
|
+
> **relativePath**: `string`
|
|
8328
|
+
|
|
8329
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:43](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L43)
|
|
8330
|
+
|
|
8331
|
+
the entry name, as it appears in the archive
|
|
8332
|
+
|
|
8333
|
+
---
|
|
8334
|
+
|
|
8335
|
+
## EpubSource
|
|
8336
|
+
|
|
8337
|
+
Defined in: [libraries/epub/src/index.tsx:141](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L141)
|
|
8338
|
+
|
|
8339
|
+
### Properties
|
|
8340
|
+
|
|
8341
|
+
#### id?
|
|
8342
|
+
|
|
8343
|
+
> `optional` **id**: `string`
|
|
8344
|
+
|
|
8345
|
+
Defined in: [libraries/epub/src/index.tsx:143](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L143)
|
|
8346
|
+
|
|
8347
|
+
#### identifierType?
|
|
8348
|
+
|
|
8349
|
+
> `optional` **identifierType**: `string`
|
|
8350
|
+
|
|
8351
|
+
Defined in: [libraries/epub/src/index.tsx:145](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L145)
|
|
8352
|
+
|
|
8353
|
+
the value of a refining `identifier-type` meta, if present
|
|
8354
|
+
|
|
8355
|
+
#### isPageBreakSource?
|
|
8356
|
+
|
|
8357
|
+
> `optional` **isPageBreakSource**: `boolean`
|
|
8358
|
+
|
|
8359
|
+
Defined in: [libraries/epub/src/index.tsx:156](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L156)
|
|
8360
|
+
|
|
8361
|
+
whether this source has a `source-of="pagination"` refinement
|
|
8362
|
+
or of a `<meta property="pageBreakSource">` element
|
|
8363
|
+
|
|
8364
|
+
as of EPUB 3.4 `source-of` is advised-deprecated in favour of the
|
|
8365
|
+
publication-level `pageBreakSource` property. if you want to
|
|
8366
|
+
be sure to get the source of pagination, use [Epub.getPageBreakSource](#getpagebreaksource)
|
|
8367
|
+
|
|
8368
|
+
#### scheme?
|
|
8369
|
+
|
|
8370
|
+
> `optional` **scheme**: `string`
|
|
8371
|
+
|
|
8372
|
+
Defined in: [libraries/epub/src/index.tsx:147](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L147)
|
|
8373
|
+
|
|
8374
|
+
the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
|
|
8375
|
+
|
|
8376
|
+
#### value
|
|
8377
|
+
|
|
8378
|
+
> **value**: `string`
|
|
8379
|
+
|
|
8380
|
+
Defined in: [libraries/epub/src/index.tsx:142](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L142)
|
|
8381
|
+
|
|
8382
|
+
---
|
|
8383
|
+
|
|
8384
|
+
## EpubStorageAdapter
|
|
8385
|
+
|
|
8386
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:56](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L56)
|
|
8387
|
+
|
|
8388
|
+
Adapters only receive entry names, which is:
|
|
8389
|
+
|
|
8390
|
+
- the name a file has in the archive itself
|
|
8391
|
+
- relative to the container root, slash-separated,
|
|
8392
|
+
- already percent-decoded (eg `OEBPS/a b.xhtml`, not `OEBPS/a%20b.xhtml`)
|
|
8393
|
+
|
|
8394
|
+
Adapter decides where to store files under what name
|
|
8395
|
+
In previous versions of the EPUB lib, this was a little bit more muddled, leading to
|
|
8396
|
+
eg the TmpFsAdapter trying to read `OEBPS/a%20b.xhtml`, whereas it was stored as `OEBPS/a b.xhtml`
|
|
8397
|
+
|
|
8398
|
+
### Methods
|
|
8399
|
+
|
|
8400
|
+
#### archiveLength()
|
|
8401
|
+
|
|
8402
|
+
> **archiveLength**(`entry`): `Promise`\<`number`\>
|
|
8403
|
+
|
|
8404
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:71](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L71)
|
|
8405
|
+
|
|
8406
|
+
Length of an entry in bytes, for the readium page-count heuristic
|
|
8407
|
+
which expects compressed size when available
|
|
8408
|
+
|
|
8409
|
+
##### Parameters
|
|
8410
|
+
|
|
8411
|
+
| Parameter | Type |
|
|
8412
|
+
| --------- | -------- |
|
|
8413
|
+
| `entry` | `string` |
|
|
8414
|
+
|
|
8415
|
+
##### Returns
|
|
8416
|
+
|
|
8417
|
+
`Promise`\<`number`\>
|
|
8418
|
+
|
|
8419
|
+
#### dispose()
|
|
8420
|
+
|
|
8421
|
+
> **dispose**(): `void` \| `Promise`\<`void`\>
|
|
8422
|
+
|
|
8423
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:90](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L90)
|
|
8424
|
+
|
|
8425
|
+
Always called on close or error
|
|
8426
|
+
|
|
8427
|
+
##### Returns
|
|
8428
|
+
|
|
8429
|
+
`void` \| `Promise`\<`void`\>
|
|
8430
|
+
|
|
8431
|
+
#### duplicate()?
|
|
8432
|
+
|
|
8433
|
+
> `optional` **duplicate**(): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8434
|
+
|
|
8435
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:84](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L84)
|
|
8436
|
+
|
|
8437
|
+
Required for Epub.copy
|
|
8438
|
+
|
|
8439
|
+
##### Returns
|
|
8440
|
+
|
|
8441
|
+
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8442
|
+
|
|
8443
|
+
#### exists()
|
|
8444
|
+
|
|
8445
|
+
> **exists**(`entry`): `Promise`\<`boolean`\>
|
|
8446
|
+
|
|
8447
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:65](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L65)
|
|
8448
|
+
|
|
8449
|
+
Whether the archive holds an entry under exactly this name.
|
|
8450
|
+
Used to choose between different canditates for an href
|
|
8451
|
+
so should be exact
|
|
8452
|
+
|
|
8453
|
+
##### Parameters
|
|
8454
|
+
|
|
8455
|
+
| Parameter | Type |
|
|
8456
|
+
| --------- | -------- |
|
|
8457
|
+
| `entry` | `string` |
|
|
8458
|
+
|
|
8459
|
+
##### Returns
|
|
8460
|
+
|
|
8461
|
+
`Promise`\<`boolean`\>
|
|
8462
|
+
|
|
8463
|
+
#### list()?
|
|
8464
|
+
|
|
8465
|
+
> `optional` **list**(): `AsyncIterable`\<[`EpubListEntry`](#epublistentry)\>
|
|
8466
|
+
|
|
8467
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:81](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L81)
|
|
8468
|
+
|
|
8469
|
+
Required for Epub.saveAndClose to walk the contents
|
|
8470
|
+
|
|
8471
|
+
##### Returns
|
|
8472
|
+
|
|
8473
|
+
`AsyncIterable`\<[`EpubListEntry`](#epublistentry)\>
|
|
8474
|
+
|
|
8475
|
+
#### read()
|
|
8476
|
+
|
|
8477
|
+
##### Call Signature
|
|
8478
|
+
|
|
8479
|
+
> **read**(`entry`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
8480
|
+
|
|
8481
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:57](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L57)
|
|
8482
|
+
|
|
8483
|
+
###### Parameters
|
|
8484
|
+
|
|
8485
|
+
| Parameter | Type |
|
|
8486
|
+
| --------- | -------- |
|
|
8487
|
+
| `entry` | `string` |
|
|
8488
|
+
|
|
8489
|
+
###### Returns
|
|
8490
|
+
|
|
8491
|
+
`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
8492
|
+
|
|
8493
|
+
##### Call Signature
|
|
8494
|
+
|
|
8495
|
+
> **read**(`entry`, `encoding`): `Promise`\<`string`\>
|
|
8496
|
+
|
|
8497
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:58](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L58)
|
|
8498
|
+
|
|
8499
|
+
###### Parameters
|
|
8500
|
+
|
|
8501
|
+
| Parameter | Type |
|
|
8502
|
+
| ---------- | --------- |
|
|
8503
|
+
| `entry` | `string` |
|
|
8504
|
+
| `encoding` | `"utf-8"` |
|
|
8505
|
+
|
|
8506
|
+
###### Returns
|
|
8507
|
+
|
|
8508
|
+
`Promise`\<`string`\>
|
|
8509
|
+
|
|
8510
|
+
#### remove()?
|
|
8511
|
+
|
|
8512
|
+
> `optional` **remove**(`entry`): `Promise`\<`void`\>
|
|
8513
|
+
|
|
8514
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:78](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L78)
|
|
8515
|
+
|
|
8516
|
+
Required for removeManifestItem / setCoverImage replacement
|
|
8517
|
+
|
|
8518
|
+
##### Parameters
|
|
8519
|
+
|
|
8520
|
+
| Parameter | Type |
|
|
8521
|
+
| --------- | -------- |
|
|
8522
|
+
| `entry` | `string` |
|
|
8523
|
+
|
|
8524
|
+
##### Returns
|
|
8525
|
+
|
|
8526
|
+
`Promise`\<`void`\>
|
|
8527
|
+
|
|
8528
|
+
#### serialize()?
|
|
8529
|
+
|
|
8530
|
+
> `optional` **serialize**(`targetPath`): `Promise`\<`void`\>
|
|
8531
|
+
|
|
8532
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:87](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L87)
|
|
8533
|
+
|
|
8534
|
+
Required for Epub.saveAndClose
|
|
8535
|
+
|
|
8536
|
+
##### Parameters
|
|
8537
|
+
|
|
8538
|
+
| Parameter | Type |
|
|
8539
|
+
| ------------ | -------- |
|
|
8540
|
+
| `targetPath` | `string` |
|
|
8541
|
+
|
|
8542
|
+
##### Returns
|
|
8543
|
+
|
|
8544
|
+
`Promise`\<`void`\>
|
|
8545
|
+
|
|
8546
|
+
#### write()?
|
|
8547
|
+
|
|
8548
|
+
##### Call Signature
|
|
8549
|
+
|
|
8550
|
+
> `optional` **write**(`entry`, `data`): `Promise`\<`void`\>
|
|
8551
|
+
|
|
8552
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:74](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L74)
|
|
8553
|
+
|
|
8554
|
+
Required for any mutation method on Epub
|
|
8555
|
+
|
|
8556
|
+
###### Parameters
|
|
8557
|
+
|
|
8558
|
+
| Parameter | Type |
|
|
8559
|
+
| --------- | ------------ |
|
|
8560
|
+
| `entry` | `string` |
|
|
8561
|
+
| `data` | `Uint8Array` |
|
|
8562
|
+
|
|
8563
|
+
###### Returns
|
|
8564
|
+
|
|
8565
|
+
`Promise`\<`void`\>
|
|
8566
|
+
|
|
8567
|
+
##### Call Signature
|
|
8568
|
+
|
|
8569
|
+
> `optional` **write**(`entry`, `data`, `encoding`): `Promise`\<`void`\>
|
|
8570
|
+
|
|
8571
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:75](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L75)
|
|
8572
|
+
|
|
8573
|
+
###### Parameters
|
|
8574
|
+
|
|
8575
|
+
| Parameter | Type |
|
|
8576
|
+
| ---------- | --------- |
|
|
8577
|
+
| `entry` | `string` |
|
|
8578
|
+
| `data` | `string` |
|
|
8579
|
+
| `encoding` | `"utf-8"` |
|
|
8580
|
+
|
|
8581
|
+
###### Returns
|
|
8582
|
+
|
|
8583
|
+
`Promise`\<`void`\>
|
|
8584
|
+
|
|
8585
|
+
---
|
|
8586
|
+
|
|
8587
|
+
## EpubStorageAdapterClass\<Opts\>
|
|
8588
|
+
|
|
8589
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:93](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L93)
|
|
8590
|
+
|
|
8591
|
+
### Type Parameters
|
|
8592
|
+
|
|
8593
|
+
| Type Parameter | Default type |
|
|
8594
|
+
| ------------------------- | ------------ |
|
|
8595
|
+
| `Opts` _extends_ `object` | `object` |
|
|
8596
|
+
|
|
8597
|
+
### Properties
|
|
8598
|
+
|
|
8599
|
+
#### capabilities
|
|
8600
|
+
|
|
8601
|
+
> `readonly` **capabilities**: [`EpubStorageCapabilities`](#epubstoragecapabilities)
|
|
8602
|
+
|
|
8603
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:95](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L95)
|
|
8604
|
+
|
|
8605
|
+
#### kind
|
|
8606
|
+
|
|
8607
|
+
> `readonly` **kind**: [`EpubStorageKind`](#epubstoragekind)
|
|
8608
|
+
|
|
8609
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:94](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L94)
|
|
8610
|
+
|
|
8611
|
+
### Methods
|
|
8612
|
+
|
|
8613
|
+
#### init()
|
|
8614
|
+
|
|
8615
|
+
> **init**(`source`, `opts?`): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8616
|
+
|
|
8617
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L101)
|
|
8618
|
+
|
|
8619
|
+
Open an archive from a path or buffer.
|
|
8620
|
+
Will throw if the archive is not a valid EPUB 3
|
|
8621
|
+
|
|
8622
|
+
##### Parameters
|
|
8623
|
+
|
|
8624
|
+
| Parameter | Type |
|
|
8625
|
+
| --------- | --------------------------------- |
|
|
8626
|
+
| `source` | [`ArchiveSource`](#archivesource) |
|
|
8627
|
+
| `opts?` | `Opts` |
|
|
8628
|
+
|
|
8629
|
+
##### Returns
|
|
8630
|
+
|
|
8631
|
+
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8632
|
+
|
|
8633
|
+
#### initEmpty()?
|
|
8634
|
+
|
|
8635
|
+
> `optional` **initEmpty**(`opts?`): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8636
|
+
|
|
8637
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:107](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L107)
|
|
8638
|
+
|
|
8639
|
+
Initialize an empty extract root for [Epub.create](#create).
|
|
8640
|
+
Only necessary for adapters that can write
|
|
8641
|
+
|
|
8642
|
+
##### Parameters
|
|
8643
|
+
|
|
8644
|
+
| Parameter | Type |
|
|
8645
|
+
| --------- | ------ |
|
|
8646
|
+
| `opts?` | `Opts` |
|
|
8647
|
+
|
|
8648
|
+
##### Returns
|
|
8649
|
+
|
|
8650
|
+
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
8651
|
+
|
|
8652
|
+
---
|
|
8653
|
+
|
|
8654
|
+
## EpubStorageCapabilities
|
|
8655
|
+
|
|
8656
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:34](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L34)
|
|
8657
|
+
|
|
8658
|
+
### Properties
|
|
8659
|
+
|
|
8660
|
+
#### writable
|
|
8661
|
+
|
|
8662
|
+
> `readonly` **writable**: `boolean`
|
|
8663
|
+
|
|
8664
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:36](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L36)
|
|
8665
|
+
|
|
8666
|
+
when false, the Epub class refuses every mutation method at runtime
|
|
8667
|
+
|
|
8668
|
+
---
|
|
8669
|
+
|
|
8670
|
+
## FromOptions
|
|
8671
|
+
|
|
8672
|
+
Defined in: [libraries/epub/src/index.tsx:210](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L210)
|
|
8673
|
+
|
|
8674
|
+
### Properties
|
|
8675
|
+
|
|
8676
|
+
#### readonly?
|
|
8677
|
+
|
|
8678
|
+
> `optional` **readonly**: `boolean`
|
|
8679
|
+
|
|
8680
|
+
Defined in: [libraries/epub/src/index.tsx:215](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L215)
|
|
8681
|
+
|
|
8682
|
+
when true, mutation methods throw [EpubReadOnlyError](#epubreadonlyerror) at runtime
|
|
8683
|
+
|
|
8684
|
+
##### Default
|
|
8685
|
+
|
|
8686
|
+
```ts
|
|
8687
|
+
false;
|
|
8688
|
+
```
|
|
8689
|
+
|
|
8690
|
+
---
|
|
8691
|
+
|
|
8692
|
+
## GuideItem
|
|
8693
|
+
|
|
8694
|
+
Defined in: [libraries/epub/src/index.tsx:204](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L204)
|
|
8695
|
+
|
|
8696
|
+
### Properties
|
|
8697
|
+
|
|
8698
|
+
#### href
|
|
8699
|
+
|
|
8700
|
+
> **href**: `string`
|
|
8701
|
+
|
|
8702
|
+
Defined in: [libraries/epub/src/index.tsx:205](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L205)
|
|
8703
|
+
|
|
8704
|
+
#### title
|
|
8705
|
+
|
|
8706
|
+
> **title**: `string`
|
|
8707
|
+
|
|
8708
|
+
Defined in: [libraries/epub/src/index.tsx:206](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L206)
|
|
8709
|
+
|
|
8710
|
+
#### type
|
|
8711
|
+
|
|
8712
|
+
> **type**: `string`
|
|
8713
|
+
|
|
8714
|
+
Defined in: [libraries/epub/src/index.tsx:207](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L207)
|
|
8715
|
+
|
|
8716
|
+
---
|
|
8717
|
+
|
|
8718
|
+
## Landmark
|
|
8719
|
+
|
|
8720
|
+
Defined in: [libraries/epub/src/upgrade.tsx:70](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L70)
|
|
8721
|
+
|
|
8722
|
+
### Properties
|
|
8723
|
+
|
|
8724
|
+
#### href
|
|
8725
|
+
|
|
8726
|
+
> **href**: `string`
|
|
8727
|
+
|
|
8728
|
+
Defined in: [libraries/epub/src/upgrade.tsx:71](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L71)
|
|
8729
|
+
|
|
8730
|
+
#### title
|
|
8731
|
+
|
|
8732
|
+
> **title**: `string`
|
|
8733
|
+
|
|
8734
|
+
Defined in: [libraries/epub/src/upgrade.tsx:72](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L72)
|
|
8735
|
+
|
|
8736
|
+
#### type
|
|
8737
|
+
|
|
8738
|
+
> **type**: `string`
|
|
8739
|
+
|
|
8740
|
+
Defined in: [libraries/epub/src/upgrade.tsx:73](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/upgrade.tsx#L73)
|
|
8741
|
+
|
|
8742
|
+
---
|
|
8743
|
+
|
|
8744
|
+
## MemoryAdapterOptions
|
|
8745
|
+
|
|
8746
|
+
Defined in: [libraries/epub/src/adapters/memory.ts:13](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/memory.ts#L13)
|
|
8747
|
+
|
|
8748
|
+
### Properties
|
|
8749
|
+
|
|
8750
|
+
#### cache?
|
|
8751
|
+
|
|
8752
|
+
> `optional` **cache**: `boolean`
|
|
8753
|
+
|
|
8754
|
+
Defined in: [libraries/epub/src/adapters/memory.ts:20](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/memory.ts#L20)
|
|
8755
|
+
|
|
8756
|
+
per-entry decompressed buffer cache
|
|
8757
|
+
turn it off when opening many EPUBs and reading each entry at most once
|
|
8758
|
+
keeps resident size bounded by the entry index, not the decompressed payload sum
|
|
8759
|
+
|
|
8760
|
+
##### Default
|
|
8761
|
+
|
|
8762
|
+
```ts
|
|
8763
|
+
true;
|
|
8764
|
+
```
|
|
8765
|
+
|
|
8766
|
+
#### signal?
|
|
8767
|
+
|
|
8768
|
+
> `optional` **signal**: `AbortSignal`
|
|
8769
|
+
|
|
8770
|
+
Defined in: [libraries/epub/src/adapters/memory.ts:21](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/memory.ts#L21)
|
|
8771
|
+
|
|
8772
|
+
---
|
|
8773
|
+
|
|
8774
|
+
## Navigation
|
|
8775
|
+
|
|
8776
|
+
Defined in: [libraries/epub/src/index.tsx:198](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L198)
|
|
8777
|
+
|
|
8778
|
+
### Properties
|
|
8779
|
+
|
|
8780
|
+
#### children
|
|
8781
|
+
|
|
8782
|
+
> **children**: [`NavigationList`](#navigationlist)
|
|
8783
|
+
|
|
8784
|
+
Defined in: [libraries/epub/src/index.tsx:201](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L201)
|
|
8785
|
+
|
|
8786
|
+
#### role
|
|
8787
|
+
|
|
8788
|
+
> **role**: `string`
|
|
8789
|
+
|
|
8790
|
+
Defined in: [libraries/epub/src/index.tsx:200](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L200)
|
|
8791
|
+
|
|
8792
|
+
#### title?
|
|
8793
|
+
|
|
8794
|
+
> `optional` **title**: `string`
|
|
8795
|
+
|
|
8796
|
+
Defined in: [libraries/epub/src/index.tsx:199](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L199)
|
|
8797
|
+
|
|
8798
|
+
---
|
|
8799
|
+
|
|
8800
|
+
## NavigationItem
|
|
8801
|
+
|
|
8802
|
+
Defined in: [libraries/epub/src/index.tsx:189](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L189)
|
|
8803
|
+
|
|
8804
|
+
### Properties
|
|
8805
|
+
|
|
8806
|
+
#### children?
|
|
8807
|
+
|
|
8808
|
+
> `optional` **children**: [`NavigationList`](#navigationlist)
|
|
8809
|
+
|
|
8810
|
+
Defined in: [libraries/epub/src/index.tsx:193](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L193)
|
|
8811
|
+
|
|
8812
|
+
#### href?
|
|
8813
|
+
|
|
8814
|
+
> `optional` **href**: `string`
|
|
8815
|
+
|
|
8816
|
+
Defined in: [libraries/epub/src/index.tsx:191](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L191)
|
|
8817
|
+
|
|
8818
|
+
#### role?
|
|
8819
|
+
|
|
8820
|
+
> `optional` **role**: `string`
|
|
8821
|
+
|
|
8822
|
+
Defined in: [libraries/epub/src/index.tsx:192](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L192)
|
|
8823
|
+
|
|
8824
|
+
#### title
|
|
8825
|
+
|
|
8826
|
+
> **title**: `string`
|
|
8827
|
+
|
|
8828
|
+
Defined in: [libraries/epub/src/index.tsx:190](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L190)
|
|
8829
|
+
|
|
8830
|
+
---
|
|
8831
|
+
|
|
8832
|
+
## Node
|
|
8833
|
+
|
|
8834
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:368
|
|
8835
|
+
|
|
8836
|
+
The DOM Node interface is an abstract base class upon which many other DOM API objects are
|
|
8837
|
+
based, thus letting those object types to be used similarly and often interchangeably. As an
|
|
8838
|
+
abstract class, there is no such thing as a plain Node object. All objects that implement
|
|
8839
|
+
Node functionality are based on one of its subclasses. Most notable are Document, Element,
|
|
8840
|
+
and DocumentFragment.
|
|
8841
|
+
|
|
8842
|
+
In addition, every kind of DOM node is represented by an interface based on Node. These
|
|
8843
|
+
include Attr, CharacterData (which Text, Comment, CDATASection and ProcessingInstruction are
|
|
8844
|
+
all based on), and DocumentType.
|
|
8845
|
+
|
|
8846
|
+
In some cases, a particular feature of the base Node interface may not apply to one of its
|
|
8847
|
+
child interfaces; in that case, the inheriting node may return null or throw an exception,
|
|
8848
|
+
depending on circumstances. For example, attempting to add children to a node type that
|
|
8849
|
+
cannot have children will throw an exception.
|
|
8850
|
+
|
|
8851
|
+
**This behavior is slightly different from the in the specs**:
|
|
8852
|
+
|
|
8853
|
+
- unimplemented interfaces: EventTarget
|
|
8854
|
+
|
|
8855
|
+
### See
|
|
8856
|
+
|
|
8857
|
+
- http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
|
|
8858
|
+
- https://dom.spec.whatwg.org/#node
|
|
8859
|
+
|
|
8860
|
+
### Prettierignore
|
|
8861
|
+
|
|
8862
|
+
### Properties
|
|
8863
|
+
|
|
8864
|
+
#### ATTRIBUTE_NODE
|
|
8865
|
+
|
|
8866
|
+
> `readonly` **ATTRIBUTE_NODE**: `2`
|
|
8867
|
+
|
|
8868
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:592
|
|
8869
|
+
|
|
8870
|
+
#### baseURI
|
|
8871
|
+
|
|
8872
|
+
> `readonly` **baseURI**: `"about:blank"`
|
|
8873
|
+
|
|
8874
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:396
|
|
8875
|
+
|
|
8876
|
+
Always returns `about:blank` currently.
|
|
8877
|
+
|
|
8878
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/baseURI)
|
|
8879
|
+
|
|
8880
|
+
#### CDATA_SECTION_NODE
|
|
8881
|
+
|
|
8882
|
+
> `readonly` **CDATA_SECTION_NODE**: `4`
|
|
8883
|
+
|
|
8884
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:596
|
|
8885
|
+
|
|
8886
|
+
node is a CDATASection node.
|
|
8887
|
+
|
|
8888
|
+
#### childNodes
|
|
8889
|
+
|
|
8890
|
+
> `readonly` **childNodes**: `NodeList`
|
|
8891
|
+
|
|
8892
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:374
|
|
8893
|
+
|
|
8894
|
+
Returns the children.
|
|
8895
|
+
|
|
8896
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
8897
|
+
|
|
8898
|
+
#### columnNumber?
|
|
8899
|
+
|
|
8900
|
+
> `optional` **columnNumber**: `number`
|
|
8901
|
+
|
|
8902
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:479
|
|
8903
|
+
|
|
8904
|
+
One based column position inside the parsed source,
|
|
8905
|
+
if the `locator` was not disabled.
|
|
8906
|
+
|
|
8907
|
+
#### COMMENT_NODE
|
|
8908
|
+
|
|
8909
|
+
> `readonly` **COMMENT_NODE**: `8`
|
|
8910
|
+
|
|
8911
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:602
|
|
8912
|
+
|
|
8913
|
+
node is a Comment node.
|
|
8914
|
+
|
|
8915
|
+
#### DOCUMENT_FRAGMENT_NODE
|
|
8916
|
+
|
|
8917
|
+
> `readonly` **DOCUMENT_FRAGMENT_NODE**: `11`
|
|
8918
|
+
|
|
8919
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:608
|
|
8920
|
+
|
|
8921
|
+
node is a DocumentFragment node.
|
|
8922
|
+
|
|
8923
|
+
#### DOCUMENT_NODE
|
|
8924
|
+
|
|
8925
|
+
> `readonly` **DOCUMENT_NODE**: `9`
|
|
8926
|
+
|
|
8927
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:604
|
|
8928
|
+
|
|
8929
|
+
node is a document.
|
|
8930
|
+
|
|
8931
|
+
#### DOCUMENT_POSITION_CONTAINED_BY
|
|
8932
|
+
|
|
8933
|
+
> `readonly` **DOCUMENT_POSITION_CONTAINED_BY**: `16`
|
|
8934
|
+
|
|
8935
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:619
|
|
8936
|
+
|
|
8937
|
+
Set when other is a descendant of node.
|
|
8938
|
+
|
|
8939
|
+
#### DOCUMENT_POSITION_CONTAINS
|
|
8940
|
+
|
|
8941
|
+
> `readonly` **DOCUMENT_POSITION_CONTAINS**: `8`
|
|
8942
|
+
|
|
8943
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:617
|
|
8944
|
+
|
|
8945
|
+
Set when other is an ancestor of node.
|
|
8946
|
+
|
|
8947
|
+
#### DOCUMENT_POSITION_DISCONNECTED
|
|
8948
|
+
|
|
8949
|
+
> `readonly` **DOCUMENT_POSITION_DISCONNECTED**: `1`
|
|
8950
|
+
|
|
8951
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:611
|
|
8952
|
+
|
|
8953
|
+
Set when node and other are not in the same tree.
|
|
8954
|
+
|
|
8955
|
+
#### DOCUMENT_POSITION_FOLLOWING
|
|
8956
|
+
|
|
8957
|
+
> `readonly` **DOCUMENT_POSITION_FOLLOWING**: `4`
|
|
8958
|
+
|
|
8959
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:615
|
|
8960
|
+
|
|
8961
|
+
Set when other is following node.
|
|
8962
|
+
|
|
8963
|
+
#### DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
|
|
8964
|
+
|
|
8965
|
+
> `readonly` **DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC**: `32`
|
|
8966
|
+
|
|
8967
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:620
|
|
8968
|
+
|
|
8969
|
+
#### DOCUMENT_POSITION_PRECEDING
|
|
8970
|
+
|
|
8971
|
+
> `readonly` **DOCUMENT_POSITION_PRECEDING**: `2`
|
|
8972
|
+
|
|
8973
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:613
|
|
8974
|
+
|
|
8975
|
+
Set when other is preceding node.
|
|
8976
|
+
|
|
8977
|
+
#### DOCUMENT_TYPE_NODE
|
|
8978
|
+
|
|
8979
|
+
> `readonly` **DOCUMENT_TYPE_NODE**: `10`
|
|
8980
|
+
|
|
8981
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:606
|
|
8982
|
+
|
|
8983
|
+
node is a doctype.
|
|
8984
|
+
|
|
8985
|
+
#### ELEMENT_NODE
|
|
8986
|
+
|
|
8987
|
+
> `readonly` **ELEMENT_NODE**: `1`
|
|
8988
|
+
|
|
8989
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:591
|
|
8990
|
+
|
|
8991
|
+
node is an element.
|
|
8992
|
+
|
|
8993
|
+
#### ENTITY_NODE
|
|
8994
|
+
|
|
8995
|
+
> `readonly` **ENTITY_NODE**: `6`
|
|
8996
|
+
|
|
8997
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:598
|
|
8998
|
+
|
|
8999
|
+
#### ENTITY_REFERENCE_NODE
|
|
9000
|
+
|
|
9001
|
+
> `readonly` **ENTITY_REFERENCE_NODE**: `5`
|
|
9002
|
+
|
|
9003
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:597
|
|
9004
|
+
|
|
9005
|
+
#### firstChild
|
|
9006
|
+
|
|
9007
|
+
> `readonly` **firstChild**: [`Node`](#node-1) \| `null`
|
|
9008
|
+
|
|
9009
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:380
|
|
9010
|
+
|
|
9011
|
+
Returns the first child.
|
|
9012
|
+
|
|
9013
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
9014
|
+
|
|
9015
|
+
#### isConnected
|
|
9016
|
+
|
|
9017
|
+
> `readonly` **isConnected**: `boolean`
|
|
9018
|
+
|
|
9019
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:402
|
|
9020
|
+
|
|
9021
|
+
Returns true if this node is inside of a document or is the document node itself.
|
|
9022
|
+
|
|
9023
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected)
|
|
9024
|
+
|
|
9025
|
+
#### lastChild
|
|
9026
|
+
|
|
9027
|
+
> `readonly` **lastChild**: [`Node`](#node-1) \| `null`
|
|
9028
|
+
|
|
9029
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:386
|
|
9030
|
+
|
|
9031
|
+
Returns the last child.
|
|
9032
|
+
|
|
9033
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lastChild)
|
|
9034
|
+
|
|
9035
|
+
#### lineNumber?
|
|
9036
|
+
|
|
9037
|
+
> `optional` **lineNumber**: `number`
|
|
9038
|
+
|
|
9039
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:474
|
|
9040
|
+
|
|
9041
|
+
Zero based line position inside the parsed source,
|
|
9042
|
+
if the `locator` was not disabled.
|
|
9043
|
+
|
|
9044
|
+
#### localName
|
|
9045
|
+
|
|
9046
|
+
> **localName**: `string` \| `null`
|
|
9047
|
+
|
|
9048
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:390
|
|
9049
|
+
|
|
9050
|
+
The local part of the qualified name of this node.
|
|
9051
|
+
|
|
9052
|
+
#### namespaceURI
|
|
9053
|
+
|
|
9054
|
+
> `readonly` **namespaceURI**: `string` \| `null`
|
|
9055
|
+
|
|
9056
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:406
|
|
9057
|
+
|
|
9058
|
+
The namespace URI of this node.
|
|
9059
|
+
|
|
9060
|
+
#### nextSibling
|
|
9061
|
+
|
|
9062
|
+
> `readonly` **nextSibling**: [`Node`](#node-1) \| `null`
|
|
9063
|
+
|
|
9064
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:412
|
|
9065
|
+
|
|
9066
|
+
Returns the next sibling.
|
|
9067
|
+
|
|
9068
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nextSibling)
|
|
9069
|
+
|
|
9070
|
+
#### nodeName
|
|
9071
|
+
|
|
9072
|
+
> `readonly` **nodeName**: `string`
|
|
9073
|
+
|
|
9074
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:418
|
|
9075
|
+
|
|
9076
|
+
Returns a string appropriate for the type of node.
|
|
9077
|
+
|
|
9078
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeName)
|
|
9079
|
+
|
|
9080
|
+
#### nodeType
|
|
9081
|
+
|
|
9082
|
+
> `readonly` **nodeType**: `number`
|
|
9083
|
+
|
|
9084
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:424
|
|
9085
|
+
|
|
9086
|
+
Returns the type of node.
|
|
9087
|
+
|
|
9088
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeType)
|
|
9089
|
+
|
|
9090
|
+
#### nodeValue
|
|
9091
|
+
|
|
9092
|
+
> **nodeValue**: `string` \| `null`
|
|
9093
|
+
|
|
9094
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:426
|
|
9095
|
+
|
|
9096
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeValue)
|
|
9097
|
+
|
|
9098
|
+
#### NOTATION_NODE
|
|
9099
|
+
|
|
9100
|
+
> `readonly` **NOTATION_NODE**: `12`
|
|
9101
|
+
|
|
9102
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:609
|
|
9103
|
+
|
|
9104
|
+
#### ownerDocument
|
|
9105
|
+
|
|
9106
|
+
> `readonly` **ownerDocument**: [`Document`](#document-1) \| `null`
|
|
9107
|
+
|
|
9108
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:432
|
|
9109
|
+
|
|
9110
|
+
Returns the node document. Returns null for documents.
|
|
9111
|
+
|
|
9112
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument)
|
|
9113
|
+
|
|
9114
|
+
#### parentElement
|
|
9115
|
+
|
|
9116
|
+
> `readonly` **parentElement**: [`Element`](#element-1) \| `null`
|
|
9117
|
+
|
|
9118
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:444
|
|
9119
|
+
|
|
9120
|
+
Returns the parent `Node` if it is of type `Element`, otherwise `null`.
|
|
9121
|
+
|
|
9122
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentElement)
|
|
9123
|
+
|
|
9124
|
+
#### parentNode
|
|
9125
|
+
|
|
9126
|
+
> `readonly` **parentNode**: [`Node`](#node-1) \| `null`
|
|
9127
|
+
|
|
9128
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:438
|
|
9129
|
+
|
|
9130
|
+
Returns the parent.
|
|
9131
|
+
|
|
9132
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentNode)
|
|
9133
|
+
|
|
9134
|
+
#### prefix
|
|
9135
|
+
|
|
9136
|
+
> **prefix**: `string` \| `null`
|
|
9137
|
+
|
|
9138
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:448
|
|
9139
|
+
|
|
9140
|
+
The prefix of the namespace for this node.
|
|
9141
|
+
|
|
9142
|
+
#### previousSibling
|
|
9143
|
+
|
|
9144
|
+
> `readonly` **previousSibling**: [`Node`](#node-1) \| `null`
|
|
9145
|
+
|
|
9146
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:454
|
|
9147
|
+
|
|
9148
|
+
Returns the previous sibling.
|
|
9149
|
+
|
|
9150
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/previousSibling)
|
|
9151
|
+
|
|
9152
|
+
#### PROCESSING_INSTRUCTION_NODE
|
|
9153
|
+
|
|
9154
|
+
> `readonly` **PROCESSING_INSTRUCTION_NODE**: `7`
|
|
9155
|
+
|
|
9156
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:600
|
|
9157
|
+
|
|
9158
|
+
node is a ProcessingInstruction node.
|
|
9159
|
+
|
|
9160
|
+
#### TEXT_NODE
|
|
9161
|
+
|
|
9162
|
+
> `readonly` **TEXT_NODE**: `3`
|
|
9163
|
+
|
|
9164
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:594
|
|
9165
|
+
|
|
9166
|
+
node is a Text node.
|
|
9167
|
+
|
|
9168
|
+
#### textContent
|
|
9169
|
+
|
|
9170
|
+
> **textContent**: `string` \| `null`
|
|
9171
|
+
|
|
9172
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:468
|
|
9173
|
+
|
|
9174
|
+
The text content of this node and its descendants.
|
|
9175
|
+
|
|
9176
|
+
For [Element](#element-1) and DocumentFragment nodes, returns the concatenation of the
|
|
9177
|
+
`nodeValue` of every descendant text node, excluding processing instruction and comment
|
|
9178
|
+
nodes. For all other node types, returns `nodeValue`.
|
|
9179
|
+
|
|
9180
|
+
Setting `textContent` on an element or document fragment replaces all child nodes with a
|
|
9181
|
+
single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly.
|
|
9182
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/textContent)
|
|
9183
|
+
|
|
9184
|
+
##### See
|
|
9185
|
+
|
|
9186
|
+
[https://dom.spec.whatwg.org/#dom-node-textcontent](https://dom.spec.whatwg.org/#dom-node-textcontent)
|
|
9187
|
+
|
|
9188
|
+
### Methods
|
|
9189
|
+
|
|
9190
|
+
#### appendChild()
|
|
9191
|
+
|
|
9192
|
+
> **appendChild**(`node`): [`Node`](#node-1)
|
|
9193
|
+
|
|
9194
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:482
|
|
9195
|
+
|
|
9196
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/appendChild)
|
|
9197
|
+
|
|
9198
|
+
##### Parameters
|
|
9199
|
+
|
|
9200
|
+
| Parameter | Type |
|
|
9201
|
+
| --------- | ----------------- |
|
|
9202
|
+
| `node` | [`Node`](#node-1) |
|
|
9203
|
+
|
|
9204
|
+
##### Returns
|
|
9205
|
+
|
|
9206
|
+
[`Node`](#node-1)
|
|
9207
|
+
|
|
9208
|
+
#### cloneNode()
|
|
9209
|
+
|
|
9210
|
+
> **cloneNode**(`deep?`): [`Node`](#node-1)
|
|
9211
|
+
|
|
9212
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:533
|
|
9213
|
+
|
|
9214
|
+
Returns a copy of node. If deep is true, the copy also includes the node's descendants.
|
|
9215
|
+
|
|
9216
|
+
##### Parameters
|
|
9217
|
+
|
|
9218
|
+
| Parameter | Type |
|
|
9219
|
+
| --------- | --------- |
|
|
9220
|
+
| `deep?` | `boolean` |
|
|
9221
|
+
|
|
9222
|
+
##### Returns
|
|
9223
|
+
|
|
9224
|
+
[`Node`](#node-1)
|
|
9225
|
+
|
|
9226
|
+
##### Throws
|
|
9227
|
+
|
|
9228
|
+
May throw a DOMException if operations within [Element#setAttributeNode](#setattributenode) or
|
|
9229
|
+
[Node#appendChild](#appendchild-8) (which are potentially invoked in this method) do not meet their
|
|
9230
|
+
specific constraints.
|
|
9231
|
+
|
|
9232
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/cloneNode)
|
|
9233
|
+
|
|
9234
|
+
#### compareDocumentPosition()
|
|
9235
|
+
|
|
9236
|
+
> **compareDocumentPosition**(`other`): `number`
|
|
9237
|
+
|
|
9238
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:540
|
|
9239
|
+
|
|
9240
|
+
Returns a bitmask indicating the position of other relative to node.
|
|
9241
|
+
|
|
9242
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/compareDocumentPosition)
|
|
9243
|
+
|
|
9244
|
+
##### Parameters
|
|
9245
|
+
|
|
9246
|
+
| Parameter | Type |
|
|
9247
|
+
| --------- | ----------------- |
|
|
9248
|
+
| `other` | [`Node`](#node-1) |
|
|
9249
|
+
|
|
9250
|
+
##### Returns
|
|
9251
|
+
|
|
9252
|
+
`number`
|
|
9253
|
+
|
|
9254
|
+
#### contains()
|
|
9255
|
+
|
|
9256
|
+
> **contains**(`other`): `boolean`
|
|
9257
|
+
|
|
9258
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:489
|
|
9259
|
+
|
|
9260
|
+
Checks whether `other` is an inclusive descendant of this node.
|
|
9261
|
+
|
|
9262
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/contains)
|
|
9263
|
+
|
|
9264
|
+
##### Parameters
|
|
9265
|
+
|
|
9266
|
+
| Parameter | Type |
|
|
9267
|
+
| --------- | ------------------------------------------ |
|
|
9268
|
+
| `other` | [`Node`](#node-1) \| `null` \| `undefined` |
|
|
9269
|
+
|
|
9270
|
+
##### Returns
|
|
9271
|
+
|
|
9272
|
+
`boolean`
|
|
9273
|
+
|
|
9274
|
+
#### getRootNode()
|
|
9275
|
+
|
|
9276
|
+
> **getRootNode**(`options`): [`Node`](#node-1)
|
|
9277
|
+
|
|
9278
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:502
|
|
9279
|
+
|
|
9280
|
+
Searches for the root node of this node.
|
|
9281
|
+
|
|
9282
|
+
**This behavior is slightly different from the one in the specs**:
|
|
9283
|
+
|
|
9284
|
+
- ignores `options.composed`, since `ShadowRoot`s are unsupported, therefore always
|
|
9285
|
+
returning root.
|
|
9286
|
+
|
|
9287
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode)
|
|
9288
|
+
|
|
9289
|
+
##### Parameters
|
|
9290
|
+
|
|
9291
|
+
| Parameter | Type |
|
|
9292
|
+
| --------- | -------------------- |
|
|
9293
|
+
| `options` | `GetRootNodeOptions` |
|
|
9294
|
+
|
|
9295
|
+
##### Returns
|
|
9296
|
+
|
|
9297
|
+
[`Node`](#node-1)
|
|
9298
|
+
|
|
9299
|
+
##### See
|
|
9300
|
+
|
|
9301
|
+
- https://dom.spec.whatwg.org/#dom-node-getrootnode
|
|
9302
|
+
- https://dom.spec.whatwg.org/#concept-shadow-including-root
|
|
9303
|
+
|
|
9304
|
+
#### hasChildNodes()
|
|
9305
|
+
|
|
9306
|
+
> **hasChildNodes**(): `boolean`
|
|
9307
|
+
|
|
9308
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:547
|
|
9309
|
+
|
|
9310
|
+
Returns whether node has children.
|
|
9311
|
+
|
|
9312
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/hasChildNodes)
|
|
9313
|
+
|
|
9314
|
+
##### Returns
|
|
9315
|
+
|
|
9316
|
+
`boolean`
|
|
9317
|
+
|
|
9318
|
+
#### insertBefore()
|
|
9319
|
+
|
|
9320
|
+
> **insertBefore**(`node`, `child`): [`Node`](#node-1)
|
|
9321
|
+
|
|
9322
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:550
|
|
9323
|
+
|
|
9324
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/insertBefore)
|
|
9325
|
+
|
|
9326
|
+
##### Parameters
|
|
9327
|
+
|
|
9328
|
+
| Parameter | Type |
|
|
9329
|
+
| --------- | --------------------------- |
|
|
9330
|
+
| `node` | [`Node`](#node-1) |
|
|
9331
|
+
| `child` | [`Node`](#node-1) \| `null` |
|
|
9332
|
+
|
|
9333
|
+
##### Returns
|
|
9334
|
+
|
|
9335
|
+
[`Node`](#node-1)
|
|
9336
|
+
|
|
9337
|
+
#### isDefaultNamespace()
|
|
9338
|
+
|
|
9339
|
+
> **isDefaultNamespace**(`namespace`): `boolean`
|
|
9340
|
+
|
|
9341
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:553
|
|
9342
|
+
|
|
9343
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/isDefaultNamespace)
|
|
9344
|
+
|
|
9345
|
+
##### Parameters
|
|
9346
|
+
|
|
9347
|
+
| Parameter | Type |
|
|
9348
|
+
| ----------- | ------------------ |
|
|
9349
|
+
| `namespace` | `string` \| `null` |
|
|
9350
|
+
|
|
9351
|
+
##### Returns
|
|
9352
|
+
|
|
9353
|
+
`boolean`
|
|
9354
|
+
|
|
9355
|
+
#### isEqualNode()
|
|
9356
|
+
|
|
9357
|
+
> **isEqualNode**(`other`): `boolean`
|
|
9358
|
+
|
|
9359
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:514
|
|
9360
|
+
|
|
9361
|
+
Checks whether the given node is equal to this node.
|
|
9362
|
+
|
|
9363
|
+
Two nodes are equal when they have the same type, defining characteristics (for the type),
|
|
9364
|
+
and the same `childNodes`. The comparison is iterative to avoid stack overflows on deeply
|
|
9365
|
+
nested trees. `Attribute` nodes of each `Element` pair are also compared iteratively.
|
|
9366
|
+
|
|
9367
|
+
##### Parameters
|
|
9368
|
+
|
|
9369
|
+
| Parameter | Type |
|
|
9370
|
+
| --------- | ----------------- |
|
|
9371
|
+
| `other` | [`Node`](#node-1) |
|
|
9372
|
+
|
|
9373
|
+
##### Returns
|
|
9374
|
+
|
|
9375
|
+
`boolean`
|
|
9376
|
+
|
|
9377
|
+
##### See
|
|
9378
|
+
|
|
9379
|
+
- [https://dom.spec.whatwg.org/#concept-node-equals](https://dom.spec.whatwg.org/#concept-node-equals)
|
|
9380
|
+
- [https://developer.mozilla.org/en-US/docs/Web/API/Node/isEqualNode](https://developer.mozilla.org/en-US/docs/Web/API/Node/isEqualNode)
|
|
9381
|
+
|
|
9382
|
+
#### isSameNode()
|
|
9383
|
+
|
|
9384
|
+
> **isSameNode**(`other`): `boolean`
|
|
9385
|
+
|
|
9386
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:521
|
|
9387
|
+
|
|
9388
|
+
Checks whether the given node is this node.
|
|
9389
|
+
|
|
9390
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/isSameNode)
|
|
9391
|
+
|
|
9392
|
+
##### Parameters
|
|
9393
|
+
|
|
9394
|
+
| Parameter | Type |
|
|
9395
|
+
| --------- | ----------------- |
|
|
9396
|
+
| `other` | [`Node`](#node-1) |
|
|
9397
|
+
|
|
9398
|
+
##### Returns
|
|
9399
|
+
|
|
9400
|
+
`boolean`
|
|
9401
|
+
|
|
9402
|
+
#### ~~isSupported()~~
|
|
9403
|
+
|
|
9404
|
+
> **isSupported**(`feature`, `version`): `true`
|
|
9405
|
+
|
|
9406
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:568
|
|
9407
|
+
|
|
9408
|
+
Checks whether the DOM implementation implements a specific feature and its version.
|
|
9409
|
+
|
|
9410
|
+
##### Parameters
|
|
9411
|
+
|
|
9412
|
+
| Parameter | Type | Description |
|
|
9413
|
+
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
9414
|
+
| `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`. |
|
|
9415
|
+
| `version` | `string` | This is the version number of the package name to test. |
|
|
9416
|
+
|
|
9417
|
+
##### Returns
|
|
9418
|
+
|
|
9419
|
+
`true`
|
|
9420
|
+
|
|
9421
|
+
##### Deprecated
|
|
9422
|
+
|
|
9423
|
+
Since `DOMImplementation.hasFeature` is deprecated and always returns true.
|
|
9424
|
+
|
|
9425
|
+
##### Since
|
|
9426
|
+
|
|
9427
|
+
Introduced in DOM Level 2
|
|
9428
|
+
|
|
9429
|
+
##### See
|
|
9430
|
+
|
|
9431
|
+
DOMImplementation.hasFeature
|
|
9432
|
+
|
|
9433
|
+
#### lookupNamespaceURI()
|
|
9434
|
+
|
|
9435
|
+
> **lookupNamespaceURI**(`prefix`): `string` \| `null`
|
|
9436
|
+
|
|
9437
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:571
|
|
9438
|
+
|
|
9439
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupNamespaceURI)
|
|
9440
|
+
|
|
9441
|
+
##### Parameters
|
|
9442
|
+
|
|
9443
|
+
| Parameter | Type |
|
|
9444
|
+
| --------- | ------------------ |
|
|
9445
|
+
| `prefix` | `string` \| `null` |
|
|
9446
|
+
|
|
9447
|
+
##### Returns
|
|
9448
|
+
|
|
9449
|
+
`string` \| `null`
|
|
9450
|
+
|
|
9451
|
+
#### lookupPrefix()
|
|
9452
|
+
|
|
9453
|
+
> **lookupPrefix**(`namespace`): `string` \| `null`
|
|
9454
|
+
|
|
9455
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:574
|
|
9456
|
+
|
|
9457
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupPrefix)
|
|
9458
|
+
|
|
9459
|
+
##### Parameters
|
|
9460
|
+
|
|
9461
|
+
| Parameter | Type |
|
|
9462
|
+
| ----------- | ------------------ |
|
|
9463
|
+
| `namespace` | `string` \| `null` |
|
|
9464
|
+
|
|
9465
|
+
##### Returns
|
|
9466
|
+
|
|
9467
|
+
`string` \| `null`
|
|
9468
|
+
|
|
9469
|
+
#### normalize()
|
|
9470
|
+
|
|
9471
|
+
> **normalize**(): `void`
|
|
9472
|
+
|
|
9473
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:582
|
|
9474
|
+
|
|
9475
|
+
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous
|
|
9476
|
+
exclusive Text nodes into the first of their nodes.
|
|
9477
|
+
|
|
9478
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/normalize)
|
|
9479
|
+
|
|
9480
|
+
##### Returns
|
|
9481
|
+
|
|
9482
|
+
`void`
|
|
9483
|
+
|
|
9484
|
+
#### removeChild()
|
|
9485
|
+
|
|
9486
|
+
> **removeChild**(`child`): [`Node`](#node-1)
|
|
9487
|
+
|
|
9488
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:585
|
|
9489
|
+
|
|
9490
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/removeChild)
|
|
9491
|
+
|
|
9492
|
+
##### Parameters
|
|
9493
|
+
|
|
9494
|
+
| Parameter | Type |
|
|
9495
|
+
| --------- | ----------------- |
|
|
9496
|
+
| `child` | [`Node`](#node-1) |
|
|
9497
|
+
|
|
9498
|
+
##### Returns
|
|
9499
|
+
|
|
9500
|
+
[`Node`](#node-1)
|
|
9501
|
+
|
|
9502
|
+
#### replaceChild()
|
|
9503
|
+
|
|
9504
|
+
> **replaceChild**(`node`, `child`): [`Node`](#node-1)
|
|
9505
|
+
|
|
9506
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:588
|
|
9507
|
+
|
|
9508
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/replaceChild)
|
|
9509
|
+
|
|
9510
|
+
##### Parameters
|
|
9511
|
+
|
|
9512
|
+
| Parameter | Type |
|
|
9513
|
+
| --------- | ----------------- |
|
|
9514
|
+
| `node` | [`Node`](#node-1) |
|
|
9515
|
+
| `child` | [`Node`](#node-1) |
|
|
9516
|
+
|
|
9517
|
+
##### Returns
|
|
9518
|
+
|
|
9519
|
+
[`Node`](#node-1)
|
|
9520
|
+
|
|
9521
|
+
---
|
|
9522
|
+
|
|
9523
|
+
## Text
|
|
9524
|
+
|
|
9525
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1051
|
|
9526
|
+
|
|
9527
|
+
The textual content of Element or Attr. If an element has no markup within its content, it has
|
|
9528
|
+
a single child implementing Text that contains the element's text. However, if the element
|
|
9529
|
+
contains markup, it is parsed into information items and Text nodes that form its children.
|
|
9530
|
+
|
|
9531
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Text)
|
|
9532
|
+
|
|
9533
|
+
### Extends
|
|
9534
|
+
|
|
9535
|
+
- `CharacterData`
|
|
9536
|
+
|
|
9537
|
+
### Properties
|
|
9538
|
+
|
|
9539
|
+
#### ATTRIBUTE_NODE
|
|
9540
|
+
|
|
9541
|
+
> `readonly` **ATTRIBUTE_NODE**: `2`
|
|
9542
|
+
|
|
9543
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:592
|
|
9544
|
+
|
|
9545
|
+
##### Inherited from
|
|
9546
|
+
|
|
9547
|
+
`CharacterData.ATTRIBUTE_NODE`
|
|
9548
|
+
|
|
9549
|
+
#### baseURI
|
|
9550
|
+
|
|
9551
|
+
> `readonly` **baseURI**: `"about:blank"`
|
|
9552
|
+
|
|
9553
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:396
|
|
9554
|
+
|
|
9555
|
+
Always returns `about:blank` currently.
|
|
9556
|
+
|
|
9557
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/baseURI)
|
|
9558
|
+
|
|
9559
|
+
##### Inherited from
|
|
9560
|
+
|
|
9561
|
+
`CharacterData.baseURI`
|
|
9562
|
+
|
|
9563
|
+
#### CDATA_SECTION_NODE
|
|
9564
|
+
|
|
9565
|
+
> `readonly` **CDATA_SECTION_NODE**: `4`
|
|
9566
|
+
|
|
9567
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:596
|
|
9568
|
+
|
|
9569
|
+
node is a CDATASection node.
|
|
9570
|
+
|
|
9571
|
+
##### Inherited from
|
|
9572
|
+
|
|
9573
|
+
`CharacterData.CDATA_SECTION_NODE`
|
|
9574
|
+
|
|
9575
|
+
#### childNodes
|
|
9576
|
+
|
|
9577
|
+
> `readonly` **childNodes**: `NodeList`
|
|
9578
|
+
|
|
9579
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:374
|
|
9580
|
+
|
|
9581
|
+
Returns the children.
|
|
9582
|
+
|
|
9583
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/childNodes)
|
|
9584
|
+
|
|
9585
|
+
##### Inherited from
|
|
9586
|
+
|
|
9587
|
+
`CharacterData.childNodes`
|
|
9588
|
+
|
|
9589
|
+
#### columnNumber?
|
|
9590
|
+
|
|
9591
|
+
> `optional` **columnNumber**: `number`
|
|
9592
|
+
|
|
9593
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:479
|
|
9594
|
+
|
|
9595
|
+
One based column position inside the parsed source,
|
|
9596
|
+
if the `locator` was not disabled.
|
|
9597
|
+
|
|
9598
|
+
##### Inherited from
|
|
9599
|
+
|
|
9600
|
+
`CharacterData.columnNumber`
|
|
9601
|
+
|
|
9602
|
+
#### COMMENT_NODE
|
|
9603
|
+
|
|
9604
|
+
> `readonly` **COMMENT_NODE**: `8`
|
|
9605
|
+
|
|
9606
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:602
|
|
9607
|
+
|
|
9608
|
+
node is a Comment node.
|
|
9609
|
+
|
|
9610
|
+
##### Inherited from
|
|
9611
|
+
|
|
9612
|
+
`CharacterData.COMMENT_NODE`
|
|
9613
|
+
|
|
9614
|
+
#### data
|
|
9615
|
+
|
|
9616
|
+
> **data**: `string`
|
|
9617
|
+
|
|
9618
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1019
|
|
9619
|
+
|
|
9620
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/data)
|
|
9621
|
+
|
|
9622
|
+
##### Inherited from
|
|
9623
|
+
|
|
9624
|
+
`CharacterData.data`
|
|
9625
|
+
|
|
9626
|
+
#### DOCUMENT_FRAGMENT_NODE
|
|
9627
|
+
|
|
9628
|
+
> `readonly` **DOCUMENT_FRAGMENT_NODE**: `11`
|
|
9629
|
+
|
|
9630
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:608
|
|
9631
|
+
|
|
9632
|
+
node is a DocumentFragment node.
|
|
9633
|
+
|
|
9634
|
+
##### Inherited from
|
|
9635
|
+
|
|
9636
|
+
`CharacterData.DOCUMENT_FRAGMENT_NODE`
|
|
9637
|
+
|
|
9638
|
+
#### DOCUMENT_NODE
|
|
9639
|
+
|
|
9640
|
+
> `readonly` **DOCUMENT_NODE**: `9`
|
|
9641
|
+
|
|
9642
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:604
|
|
9643
|
+
|
|
9644
|
+
node is a document.
|
|
9645
|
+
|
|
9646
|
+
##### Inherited from
|
|
9647
|
+
|
|
9648
|
+
`CharacterData.DOCUMENT_NODE`
|
|
9649
|
+
|
|
9650
|
+
#### DOCUMENT_POSITION_CONTAINED_BY
|
|
9651
|
+
|
|
9652
|
+
> `readonly` **DOCUMENT_POSITION_CONTAINED_BY**: `16`
|
|
9653
|
+
|
|
9654
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:619
|
|
9655
|
+
|
|
9656
|
+
Set when other is a descendant of node.
|
|
9657
|
+
|
|
9658
|
+
##### Inherited from
|
|
9659
|
+
|
|
9660
|
+
`CharacterData.DOCUMENT_POSITION_CONTAINED_BY`
|
|
9661
|
+
|
|
9662
|
+
#### DOCUMENT_POSITION_CONTAINS
|
|
9663
|
+
|
|
9664
|
+
> `readonly` **DOCUMENT_POSITION_CONTAINS**: `8`
|
|
9665
|
+
|
|
9666
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:617
|
|
9667
|
+
|
|
9668
|
+
Set when other is an ancestor of node.
|
|
9669
|
+
|
|
9670
|
+
##### Inherited from
|
|
9671
|
+
|
|
9672
|
+
`CharacterData.DOCUMENT_POSITION_CONTAINS`
|
|
9673
|
+
|
|
9674
|
+
#### DOCUMENT_POSITION_DISCONNECTED
|
|
9675
|
+
|
|
9676
|
+
> `readonly` **DOCUMENT_POSITION_DISCONNECTED**: `1`
|
|
9677
|
+
|
|
9678
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:611
|
|
9679
|
+
|
|
9680
|
+
Set when node and other are not in the same tree.
|
|
9681
|
+
|
|
9682
|
+
##### Inherited from
|
|
9683
|
+
|
|
9684
|
+
`CharacterData.DOCUMENT_POSITION_DISCONNECTED`
|
|
9685
|
+
|
|
9686
|
+
#### DOCUMENT_POSITION_FOLLOWING
|
|
9687
|
+
|
|
9688
|
+
> `readonly` **DOCUMENT_POSITION_FOLLOWING**: `4`
|
|
9689
|
+
|
|
9690
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:615
|
|
9691
|
+
|
|
9692
|
+
Set when other is following node.
|
|
9693
|
+
|
|
9694
|
+
##### Inherited from
|
|
9695
|
+
|
|
9696
|
+
`CharacterData.DOCUMENT_POSITION_FOLLOWING`
|
|
9697
|
+
|
|
9698
|
+
#### DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
|
|
9699
|
+
|
|
9700
|
+
> `readonly` **DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC**: `32`
|
|
9701
|
+
|
|
9702
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:620
|
|
9703
|
+
|
|
9704
|
+
##### Inherited from
|
|
9705
|
+
|
|
9706
|
+
`CharacterData.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC`
|
|
9707
|
+
|
|
9708
|
+
#### DOCUMENT_POSITION_PRECEDING
|
|
9709
|
+
|
|
9710
|
+
> `readonly` **DOCUMENT_POSITION_PRECEDING**: `2`
|
|
9711
|
+
|
|
9712
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:613
|
|
9713
|
+
|
|
9714
|
+
Set when other is preceding node.
|
|
9715
|
+
|
|
9716
|
+
##### Inherited from
|
|
9717
|
+
|
|
9718
|
+
`CharacterData.DOCUMENT_POSITION_PRECEDING`
|
|
9719
|
+
|
|
9720
|
+
#### DOCUMENT_TYPE_NODE
|
|
9721
|
+
|
|
9722
|
+
> `readonly` **DOCUMENT_TYPE_NODE**: `10`
|
|
9723
|
+
|
|
9724
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:606
|
|
9725
|
+
|
|
9726
|
+
node is a doctype.
|
|
9727
|
+
|
|
9728
|
+
##### Inherited from
|
|
9729
|
+
|
|
9730
|
+
`CharacterData.DOCUMENT_TYPE_NODE`
|
|
9731
|
+
|
|
9732
|
+
#### ELEMENT_NODE
|
|
9733
|
+
|
|
9734
|
+
> `readonly` **ELEMENT_NODE**: `1`
|
|
9735
|
+
|
|
9736
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:591
|
|
9737
|
+
|
|
9738
|
+
node is an element.
|
|
9739
|
+
|
|
9740
|
+
##### Inherited from
|
|
9741
|
+
|
|
9742
|
+
`CharacterData.ELEMENT_NODE`
|
|
9743
|
+
|
|
9744
|
+
#### ENTITY_NODE
|
|
9745
|
+
|
|
9746
|
+
> `readonly` **ENTITY_NODE**: `6`
|
|
9747
|
+
|
|
9748
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:598
|
|
9749
|
+
|
|
9750
|
+
##### Inherited from
|
|
9751
|
+
|
|
9752
|
+
`CharacterData.ENTITY_NODE`
|
|
9753
|
+
|
|
9754
|
+
#### ENTITY_REFERENCE_NODE
|
|
9755
|
+
|
|
9756
|
+
> `readonly` **ENTITY_REFERENCE_NODE**: `5`
|
|
9757
|
+
|
|
9758
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:597
|
|
9759
|
+
|
|
9760
|
+
##### Inherited from
|
|
9761
|
+
|
|
9762
|
+
`CharacterData.ENTITY_REFERENCE_NODE`
|
|
9763
|
+
|
|
9764
|
+
#### firstChild
|
|
9765
|
+
|
|
9766
|
+
> `readonly` **firstChild**: [`Node`](#node-1) \| `null`
|
|
9767
|
+
|
|
9768
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:380
|
|
9769
|
+
|
|
9770
|
+
Returns the first child.
|
|
9771
|
+
|
|
9772
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/firstChild)
|
|
9773
|
+
|
|
9774
|
+
##### Inherited from
|
|
9775
|
+
|
|
9776
|
+
`CharacterData.firstChild`
|
|
9777
|
+
|
|
9778
|
+
#### isConnected
|
|
9779
|
+
|
|
9780
|
+
> `readonly` **isConnected**: `boolean`
|
|
9781
|
+
|
|
9782
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:402
|
|
9783
|
+
|
|
9784
|
+
Returns true if this node is inside of a document or is the document node itself.
|
|
9785
|
+
|
|
9786
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected)
|
|
9787
|
+
|
|
9788
|
+
##### Inherited from
|
|
9789
|
+
|
|
9790
|
+
`CharacterData.isConnected`
|
|
9791
|
+
|
|
9792
|
+
#### lastChild
|
|
9793
|
+
|
|
9794
|
+
> `readonly` **lastChild**: [`Node`](#node-1) \| `null`
|
|
9795
|
+
|
|
9796
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:386
|
|
9797
|
+
|
|
9798
|
+
Returns the last child.
|
|
9799
|
+
|
|
9800
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lastChild)
|
|
9801
|
+
|
|
9802
|
+
##### Inherited from
|
|
9803
|
+
|
|
9804
|
+
`CharacterData.lastChild`
|
|
9805
|
+
|
|
9806
|
+
#### length
|
|
9807
|
+
|
|
9808
|
+
> `readonly` **length**: `number`
|
|
9809
|
+
|
|
9810
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1021
|
|
9811
|
+
|
|
9812
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/length)
|
|
9813
|
+
|
|
9814
|
+
##### Inherited from
|
|
9815
|
+
|
|
9816
|
+
`CharacterData.length`
|
|
9817
|
+
|
|
9818
|
+
#### lineNumber?
|
|
9819
|
+
|
|
9820
|
+
> `optional` **lineNumber**: `number`
|
|
9821
|
+
|
|
9822
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:474
|
|
9823
|
+
|
|
9824
|
+
Zero based line position inside the parsed source,
|
|
9825
|
+
if the `locator` was not disabled.
|
|
9826
|
+
|
|
9827
|
+
##### Inherited from
|
|
9828
|
+
|
|
9829
|
+
`CharacterData.lineNumber`
|
|
9830
|
+
|
|
9831
|
+
#### localName
|
|
9832
|
+
|
|
9833
|
+
> **localName**: `string` \| `null`
|
|
9834
|
+
|
|
9835
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:390
|
|
9836
|
+
|
|
9837
|
+
The local part of the qualified name of this node.
|
|
9838
|
+
|
|
9839
|
+
##### Inherited from
|
|
9840
|
+
|
|
9841
|
+
`CharacterData.localName`
|
|
9842
|
+
|
|
9843
|
+
#### namespaceURI
|
|
9844
|
+
|
|
9845
|
+
> `readonly` **namespaceURI**: `string` \| `null`
|
|
9846
|
+
|
|
9847
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:406
|
|
9848
|
+
|
|
9849
|
+
The namespace URI of this node.
|
|
9850
|
+
|
|
9851
|
+
##### Inherited from
|
|
9852
|
+
|
|
9853
|
+
`CharacterData.namespaceURI`
|
|
9854
|
+
|
|
9855
|
+
#### nextSibling
|
|
9856
|
+
|
|
9857
|
+
> `readonly` **nextSibling**: [`Node`](#node-1) \| `null`
|
|
9858
|
+
|
|
9859
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:412
|
|
9860
|
+
|
|
9861
|
+
Returns the next sibling.
|
|
9862
|
+
|
|
9863
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nextSibling)
|
|
9864
|
+
|
|
9865
|
+
##### Inherited from
|
|
9866
|
+
|
|
9867
|
+
`CharacterData.nextSibling`
|
|
9868
|
+
|
|
9869
|
+
#### nodeName
|
|
9870
|
+
|
|
9871
|
+
> **nodeName**: `"#text"` \| `"#cdata-section"`
|
|
9872
|
+
|
|
9873
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1052
|
|
9874
|
+
|
|
9875
|
+
Returns a string appropriate for the type of node.
|
|
9876
|
+
|
|
9877
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeName)
|
|
9878
|
+
|
|
9879
|
+
##### Overrides
|
|
9880
|
+
|
|
9881
|
+
`CharacterData.nodeName`
|
|
9882
|
+
|
|
9883
|
+
#### nodeType
|
|
9884
|
+
|
|
9885
|
+
> **nodeType**: `3` \| `4`
|
|
9886
|
+
|
|
9887
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1053
|
|
9888
|
+
|
|
9889
|
+
Returns the type of node.
|
|
9890
|
+
|
|
9891
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeType)
|
|
9892
|
+
|
|
9893
|
+
##### Overrides
|
|
9894
|
+
|
|
9895
|
+
`CharacterData.nodeType`
|
|
9896
|
+
|
|
9897
|
+
#### nodeValue
|
|
9898
|
+
|
|
9899
|
+
> **nodeValue**: `string` \| `null`
|
|
9900
|
+
|
|
9901
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:426
|
|
9902
|
+
|
|
9903
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeValue)
|
|
9904
|
+
|
|
9905
|
+
##### Inherited from
|
|
9906
|
+
|
|
9907
|
+
`CharacterData.nodeValue`
|
|
9908
|
+
|
|
9909
|
+
#### NOTATION_NODE
|
|
9910
|
+
|
|
9911
|
+
> `readonly` **NOTATION_NODE**: `12`
|
|
9912
|
+
|
|
9913
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:609
|
|
9914
|
+
|
|
9915
|
+
##### Inherited from
|
|
9916
|
+
|
|
9917
|
+
`CharacterData.NOTATION_NODE`
|
|
9918
|
+
|
|
9919
|
+
#### ownerDocument
|
|
9920
|
+
|
|
9921
|
+
> `readonly` **ownerDocument**: [`Document`](#document-1)
|
|
9922
|
+
|
|
9923
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1022
|
|
9924
|
+
|
|
9925
|
+
Returns the node document. Returns null for documents.
|
|
9926
|
+
|
|
9927
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument)
|
|
9928
|
+
|
|
9929
|
+
##### Inherited from
|
|
9930
|
+
|
|
9931
|
+
`CharacterData.ownerDocument`
|
|
9932
|
+
|
|
9933
|
+
#### parentElement
|
|
9934
|
+
|
|
9935
|
+
> `readonly` **parentElement**: [`Element`](#element-1) \| `null`
|
|
9936
|
+
|
|
9937
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:444
|
|
9938
|
+
|
|
9939
|
+
Returns the parent `Node` if it is of type `Element`, otherwise `null`.
|
|
9940
|
+
|
|
9941
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentElement)
|
|
9942
|
+
|
|
9943
|
+
##### Inherited from
|
|
9944
|
+
|
|
9945
|
+
`CharacterData.parentElement`
|
|
9946
|
+
|
|
9947
|
+
#### parentNode
|
|
9948
|
+
|
|
9949
|
+
> `readonly` **parentNode**: [`Node`](#node-1) \| `null`
|
|
9950
|
+
|
|
9951
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:438
|
|
9952
|
+
|
|
9953
|
+
Returns the parent.
|
|
9954
|
+
|
|
9955
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentNode)
|
|
9956
|
+
|
|
9957
|
+
##### Inherited from
|
|
9958
|
+
|
|
9959
|
+
`CharacterData.parentNode`
|
|
9960
|
+
|
|
9961
|
+
#### prefix
|
|
9962
|
+
|
|
9963
|
+
> **prefix**: `string` \| `null`
|
|
9964
|
+
|
|
9965
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:448
|
|
9966
|
+
|
|
9967
|
+
The prefix of the namespace for this node.
|
|
9968
|
+
|
|
9969
|
+
##### Inherited from
|
|
9970
|
+
|
|
9971
|
+
`CharacterData.prefix`
|
|
9972
|
+
|
|
9973
|
+
#### previousSibling
|
|
9974
|
+
|
|
9975
|
+
> `readonly` **previousSibling**: [`Node`](#node-1) \| `null`
|
|
9976
|
+
|
|
9977
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:454
|
|
9978
|
+
|
|
9979
|
+
Returns the previous sibling.
|
|
9980
|
+
|
|
9981
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/previousSibling)
|
|
9982
|
+
|
|
9983
|
+
##### Inherited from
|
|
9984
|
+
|
|
9985
|
+
`CharacterData.previousSibling`
|
|
9986
|
+
|
|
9987
|
+
#### PROCESSING_INSTRUCTION_NODE
|
|
9988
|
+
|
|
9989
|
+
> `readonly` **PROCESSING_INSTRUCTION_NODE**: `7`
|
|
9990
|
+
|
|
9991
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:600
|
|
9992
|
+
|
|
9993
|
+
node is a ProcessingInstruction node.
|
|
9994
|
+
|
|
9995
|
+
##### Inherited from
|
|
9996
|
+
|
|
9997
|
+
`CharacterData.PROCESSING_INSTRUCTION_NODE`
|
|
9998
|
+
|
|
9999
|
+
#### TEXT_NODE
|
|
10000
|
+
|
|
10001
|
+
> `readonly` **TEXT_NODE**: `3`
|
|
10002
|
+
|
|
10003
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:594
|
|
10004
|
+
|
|
10005
|
+
node is a Text node.
|
|
10006
|
+
|
|
10007
|
+
##### Inherited from
|
|
10008
|
+
|
|
10009
|
+
`CharacterData.TEXT_NODE`
|
|
10010
|
+
|
|
10011
|
+
#### textContent
|
|
10012
|
+
|
|
10013
|
+
> **textContent**: `string` \| `null`
|
|
10014
|
+
|
|
10015
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:468
|
|
10016
|
+
|
|
10017
|
+
The text content of this node and its descendants.
|
|
10018
|
+
|
|
10019
|
+
For [Element](#element-1) and DocumentFragment nodes, returns the concatenation of the
|
|
10020
|
+
`nodeValue` of every descendant text node, excluding processing instruction and comment
|
|
10021
|
+
nodes. For all other node types, returns `nodeValue`.
|
|
10022
|
+
|
|
10023
|
+
Setting `textContent` on an element or document fragment replaces all child nodes with a
|
|
10024
|
+
single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly.
|
|
10025
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/textContent)
|
|
10026
|
+
|
|
10027
|
+
##### See
|
|
10028
|
+
|
|
10029
|
+
[https://dom.spec.whatwg.org/#dom-node-textcontent](https://dom.spec.whatwg.org/#dom-node-textcontent)
|
|
10030
|
+
|
|
10031
|
+
##### Inherited from
|
|
10032
|
+
|
|
10033
|
+
`CharacterData.textContent`
|
|
10034
|
+
|
|
10035
|
+
### Methods
|
|
10036
|
+
|
|
10037
|
+
#### appendChild()
|
|
10038
|
+
|
|
10039
|
+
> **appendChild**(`node`): [`Node`](#node-1)
|
|
10040
|
+
|
|
10041
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:482
|
|
10042
|
+
|
|
10043
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/appendChild)
|
|
10044
|
+
|
|
10045
|
+
##### Parameters
|
|
10046
|
+
|
|
10047
|
+
| Parameter | Type |
|
|
10048
|
+
| --------- | ----------------- |
|
|
10049
|
+
| `node` | [`Node`](#node-1) |
|
|
10050
|
+
|
|
10051
|
+
##### Returns
|
|
10052
|
+
|
|
10053
|
+
[`Node`](#node-1)
|
|
10054
|
+
|
|
10055
|
+
##### Inherited from
|
|
10056
|
+
|
|
10057
|
+
`CharacterData.appendChild`
|
|
10058
|
+
|
|
10059
|
+
#### appendData()
|
|
10060
|
+
|
|
10061
|
+
> **appendData**(`data`): `void`
|
|
10062
|
+
|
|
10063
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1024
|
|
10064
|
+
|
|
10065
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/appendData)
|
|
10066
|
+
|
|
10067
|
+
##### Parameters
|
|
10068
|
+
|
|
10069
|
+
| Parameter | Type |
|
|
10070
|
+
| --------- | -------- |
|
|
10071
|
+
| `data` | `string` |
|
|
10072
|
+
|
|
10073
|
+
##### Returns
|
|
10074
|
+
|
|
10075
|
+
`void`
|
|
10076
|
+
|
|
10077
|
+
##### Inherited from
|
|
10078
|
+
|
|
10079
|
+
`CharacterData.appendData`
|
|
10080
|
+
|
|
10081
|
+
#### cloneNode()
|
|
10082
|
+
|
|
10083
|
+
> **cloneNode**(`deep?`): [`Node`](#node-1)
|
|
10084
|
+
|
|
10085
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:533
|
|
10086
|
+
|
|
10087
|
+
Returns a copy of node. If deep is true, the copy also includes the node's descendants.
|
|
10088
|
+
|
|
10089
|
+
##### Parameters
|
|
10090
|
+
|
|
10091
|
+
| Parameter | Type |
|
|
10092
|
+
| --------- | --------- |
|
|
10093
|
+
| `deep?` | `boolean` |
|
|
10094
|
+
|
|
10095
|
+
##### Returns
|
|
10096
|
+
|
|
10097
|
+
[`Node`](#node-1)
|
|
10098
|
+
|
|
10099
|
+
##### Throws
|
|
10100
|
+
|
|
10101
|
+
May throw a DOMException if operations within [Element#setAttributeNode](#setattributenode) or
|
|
10102
|
+
[Node#appendChild](#appendchild-8) (which are potentially invoked in this method) do not meet their
|
|
10103
|
+
specific constraints.
|
|
10104
|
+
|
|
10105
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/cloneNode)
|
|
10106
|
+
|
|
10107
|
+
##### Inherited from
|
|
10108
|
+
|
|
10109
|
+
`CharacterData.cloneNode`
|
|
10110
|
+
|
|
10111
|
+
#### compareDocumentPosition()
|
|
10112
|
+
|
|
10113
|
+
> **compareDocumentPosition**(`other`): `number`
|
|
10114
|
+
|
|
10115
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:540
|
|
10116
|
+
|
|
10117
|
+
Returns a bitmask indicating the position of other relative to node.
|
|
10118
|
+
|
|
10119
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/compareDocumentPosition)
|
|
10120
|
+
|
|
10121
|
+
##### Parameters
|
|
10122
|
+
|
|
10123
|
+
| Parameter | Type |
|
|
10124
|
+
| --------- | ----------------- |
|
|
10125
|
+
| `other` | [`Node`](#node-1) |
|
|
10126
|
+
|
|
10127
|
+
##### Returns
|
|
10128
|
+
|
|
10129
|
+
`number`
|
|
10130
|
+
|
|
10131
|
+
##### Inherited from
|
|
10132
|
+
|
|
10133
|
+
`CharacterData.compareDocumentPosition`
|
|
10134
|
+
|
|
10135
|
+
#### contains()
|
|
10136
|
+
|
|
10137
|
+
> **contains**(`other`): `boolean`
|
|
10138
|
+
|
|
10139
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:489
|
|
10140
|
+
|
|
10141
|
+
Checks whether `other` is an inclusive descendant of this node.
|
|
10142
|
+
|
|
10143
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/contains)
|
|
10144
|
+
|
|
10145
|
+
##### Parameters
|
|
10146
|
+
|
|
10147
|
+
| Parameter | Type |
|
|
10148
|
+
| --------- | ------------------------------------------ |
|
|
10149
|
+
| `other` | [`Node`](#node-1) \| `null` \| `undefined` |
|
|
10150
|
+
|
|
10151
|
+
##### Returns
|
|
10152
|
+
|
|
10153
|
+
`boolean`
|
|
10154
|
+
|
|
10155
|
+
##### Inherited from
|
|
10156
|
+
|
|
10157
|
+
`CharacterData.contains`
|
|
10158
|
+
|
|
10159
|
+
#### deleteData()
|
|
10160
|
+
|
|
10161
|
+
> **deleteData**(`offset`, `count`): `void`
|
|
10162
|
+
|
|
10163
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1026
|
|
10164
|
+
|
|
10165
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/deleteData)
|
|
10166
|
+
|
|
10167
|
+
##### Parameters
|
|
10168
|
+
|
|
10169
|
+
| Parameter | Type |
|
|
10170
|
+
| --------- | -------- |
|
|
10171
|
+
| `offset` | `number` |
|
|
10172
|
+
| `count` | `number` |
|
|
10173
|
+
|
|
10174
|
+
##### Returns
|
|
10175
|
+
|
|
10176
|
+
`void`
|
|
10177
|
+
|
|
10178
|
+
##### Inherited from
|
|
10179
|
+
|
|
10180
|
+
`CharacterData.deleteData`
|
|
10181
|
+
|
|
10182
|
+
#### getRootNode()
|
|
10183
|
+
|
|
10184
|
+
> **getRootNode**(`options`): [`Node`](#node-1)
|
|
10185
|
+
|
|
10186
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:502
|
|
10187
|
+
|
|
10188
|
+
Searches for the root node of this node.
|
|
10189
|
+
|
|
10190
|
+
**This behavior is slightly different from the one in the specs**:
|
|
10191
|
+
|
|
10192
|
+
- ignores `options.composed`, since `ShadowRoot`s are unsupported, therefore always
|
|
10193
|
+
returning root.
|
|
10194
|
+
|
|
10195
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode)
|
|
10196
|
+
|
|
10197
|
+
##### Parameters
|
|
10198
|
+
|
|
10199
|
+
| Parameter | Type |
|
|
10200
|
+
| --------- | -------------------- |
|
|
10201
|
+
| `options` | `GetRootNodeOptions` |
|
|
10202
|
+
|
|
10203
|
+
##### Returns
|
|
10204
|
+
|
|
10205
|
+
[`Node`](#node-1)
|
|
10206
|
+
|
|
10207
|
+
##### See
|
|
10208
|
+
|
|
10209
|
+
- https://dom.spec.whatwg.org/#dom-node-getrootnode
|
|
10210
|
+
- https://dom.spec.whatwg.org/#concept-shadow-including-root
|
|
10211
|
+
|
|
10212
|
+
##### Inherited from
|
|
10213
|
+
|
|
10214
|
+
`CharacterData.getRootNode`
|
|
10215
|
+
|
|
10216
|
+
#### hasChildNodes()
|
|
10217
|
+
|
|
10218
|
+
> **hasChildNodes**(): `boolean`
|
|
10219
|
+
|
|
10220
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:547
|
|
10221
|
+
|
|
10222
|
+
Returns whether node has children.
|
|
10223
|
+
|
|
10224
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/hasChildNodes)
|
|
10225
|
+
|
|
10226
|
+
##### Returns
|
|
10227
|
+
|
|
10228
|
+
`boolean`
|
|
10229
|
+
|
|
10230
|
+
##### Inherited from
|
|
10231
|
+
|
|
10232
|
+
`CharacterData.hasChildNodes`
|
|
10233
|
+
|
|
10234
|
+
#### insertBefore()
|
|
10235
|
+
|
|
10236
|
+
> **insertBefore**(`node`, `child`): [`Node`](#node-1)
|
|
10237
|
+
|
|
10238
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:550
|
|
10239
|
+
|
|
10240
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/insertBefore)
|
|
10241
|
+
|
|
10242
|
+
##### Parameters
|
|
10243
|
+
|
|
10244
|
+
| Parameter | Type |
|
|
10245
|
+
| --------- | --------------------------- |
|
|
10246
|
+
| `node` | [`Node`](#node-1) |
|
|
10247
|
+
| `child` | [`Node`](#node-1) \| `null` |
|
|
10248
|
+
|
|
10249
|
+
##### Returns
|
|
10250
|
+
|
|
10251
|
+
[`Node`](#node-1)
|
|
10252
|
+
|
|
10253
|
+
##### Inherited from
|
|
10254
|
+
|
|
10255
|
+
`CharacterData.insertBefore`
|
|
10256
|
+
|
|
10257
|
+
#### insertData()
|
|
10258
|
+
|
|
10259
|
+
> **insertData**(`offset`, `data`): `void`
|
|
10260
|
+
|
|
10261
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1028
|
|
10262
|
+
|
|
10263
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/insertData)
|
|
10264
|
+
|
|
10265
|
+
##### Parameters
|
|
10266
|
+
|
|
10267
|
+
| Parameter | Type |
|
|
10268
|
+
| --------- | -------- |
|
|
10269
|
+
| `offset` | `number` |
|
|
10270
|
+
| `data` | `string` |
|
|
10271
|
+
|
|
10272
|
+
##### Returns
|
|
10273
|
+
|
|
10274
|
+
`void`
|
|
10275
|
+
|
|
10276
|
+
##### Inherited from
|
|
10277
|
+
|
|
10278
|
+
`CharacterData.insertData`
|
|
10279
|
+
|
|
10280
|
+
#### isDefaultNamespace()
|
|
10281
|
+
|
|
10282
|
+
> **isDefaultNamespace**(`namespace`): `boolean`
|
|
10283
|
+
|
|
10284
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:553
|
|
10285
|
+
|
|
10286
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/isDefaultNamespace)
|
|
10287
|
+
|
|
10288
|
+
##### Parameters
|
|
10289
|
+
|
|
10290
|
+
| Parameter | Type |
|
|
10291
|
+
| ----------- | ------------------ |
|
|
10292
|
+
| `namespace` | `string` \| `null` |
|
|
10293
|
+
|
|
10294
|
+
##### Returns
|
|
10295
|
+
|
|
10296
|
+
`boolean`
|
|
10297
|
+
|
|
10298
|
+
##### Inherited from
|
|
10299
|
+
|
|
10300
|
+
`CharacterData.isDefaultNamespace`
|
|
10301
|
+
|
|
10302
|
+
#### isEqualNode()
|
|
10303
|
+
|
|
10304
|
+
> **isEqualNode**(`other`): `boolean`
|
|
10305
|
+
|
|
10306
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:514
|
|
10307
|
+
|
|
10308
|
+
Checks whether the given node is equal to this node.
|
|
10309
|
+
|
|
10310
|
+
Two nodes are equal when they have the same type, defining characteristics (for the type),
|
|
10311
|
+
and the same `childNodes`. The comparison is iterative to avoid stack overflows on deeply
|
|
10312
|
+
nested trees. `Attribute` nodes of each `Element` pair are also compared iteratively.
|
|
10313
|
+
|
|
10314
|
+
##### Parameters
|
|
10315
|
+
|
|
10316
|
+
| Parameter | Type |
|
|
10317
|
+
| --------- | ----------------- |
|
|
10318
|
+
| `other` | [`Node`](#node-1) |
|
|
10319
|
+
|
|
10320
|
+
##### Returns
|
|
10321
|
+
|
|
10322
|
+
`boolean`
|
|
10323
|
+
|
|
10324
|
+
##### See
|
|
10325
|
+
|
|
10326
|
+
- [https://dom.spec.whatwg.org/#concept-node-equals](https://dom.spec.whatwg.org/#concept-node-equals)
|
|
10327
|
+
- [https://developer.mozilla.org/en-US/docs/Web/API/Node/isEqualNode](https://developer.mozilla.org/en-US/docs/Web/API/Node/isEqualNode)
|
|
10328
|
+
|
|
10329
|
+
##### Inherited from
|
|
10330
|
+
|
|
10331
|
+
`CharacterData.isEqualNode`
|
|
10332
|
+
|
|
10333
|
+
#### isSameNode()
|
|
10334
|
+
|
|
10335
|
+
> **isSameNode**(`other`): `boolean`
|
|
10336
|
+
|
|
10337
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:521
|
|
10338
|
+
|
|
10339
|
+
Checks whether the given node is this node.
|
|
10340
|
+
|
|
10341
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/isSameNode)
|
|
10342
|
+
|
|
10343
|
+
##### Parameters
|
|
10344
|
+
|
|
10345
|
+
| Parameter | Type |
|
|
10346
|
+
| --------- | ----------------- |
|
|
10347
|
+
| `other` | [`Node`](#node-1) |
|
|
10348
|
+
|
|
10349
|
+
##### Returns
|
|
10350
|
+
|
|
10351
|
+
`boolean`
|
|
10352
|
+
|
|
10353
|
+
##### Inherited from
|
|
10354
|
+
|
|
10355
|
+
`CharacterData.isSameNode`
|
|
10356
|
+
|
|
10357
|
+
#### ~~isSupported()~~
|
|
10358
|
+
|
|
10359
|
+
> **isSupported**(`feature`, `version`): `true`
|
|
10360
|
+
|
|
10361
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:568
|
|
10362
|
+
|
|
10363
|
+
Checks whether the DOM implementation implements a specific feature and its version.
|
|
10364
|
+
|
|
10365
|
+
##### Parameters
|
|
10366
|
+
|
|
10367
|
+
| Parameter | Type | Description |
|
|
10368
|
+
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
10369
|
+
| `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`. |
|
|
10370
|
+
| `version` | `string` | This is the version number of the package name to test. |
|
|
10371
|
+
|
|
10372
|
+
##### Returns
|
|
10373
|
+
|
|
10374
|
+
`true`
|
|
10375
|
+
|
|
10376
|
+
##### Deprecated
|
|
10377
|
+
|
|
10378
|
+
Since `DOMImplementation.hasFeature` is deprecated and always returns true.
|
|
10379
|
+
|
|
10380
|
+
##### Since
|
|
10381
|
+
|
|
10382
|
+
Introduced in DOM Level 2
|
|
10383
|
+
|
|
10384
|
+
##### See
|
|
10385
|
+
|
|
10386
|
+
DOMImplementation.hasFeature
|
|
10387
|
+
|
|
10388
|
+
##### Inherited from
|
|
10389
|
+
|
|
10390
|
+
`CharacterData.isSupported`
|
|
10391
|
+
|
|
10392
|
+
#### lookupNamespaceURI()
|
|
10393
|
+
|
|
10394
|
+
> **lookupNamespaceURI**(`prefix`): `string` \| `null`
|
|
10395
|
+
|
|
10396
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:571
|
|
10397
|
+
|
|
10398
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupNamespaceURI)
|
|
10399
|
+
|
|
10400
|
+
##### Parameters
|
|
10401
|
+
|
|
10402
|
+
| Parameter | Type |
|
|
10403
|
+
| --------- | ------------------ |
|
|
10404
|
+
| `prefix` | `string` \| `null` |
|
|
10405
|
+
|
|
10406
|
+
##### Returns
|
|
10407
|
+
|
|
10408
|
+
`string` \| `null`
|
|
10409
|
+
|
|
10410
|
+
##### Inherited from
|
|
10411
|
+
|
|
10412
|
+
`CharacterData.lookupNamespaceURI`
|
|
10413
|
+
|
|
10414
|
+
#### lookupPrefix()
|
|
10415
|
+
|
|
10416
|
+
> **lookupPrefix**(`namespace`): `string` \| `null`
|
|
10417
|
+
|
|
10418
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:574
|
|
10419
|
+
|
|
10420
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupPrefix)
|
|
10421
|
+
|
|
10422
|
+
##### Parameters
|
|
10423
|
+
|
|
10424
|
+
| Parameter | Type |
|
|
10425
|
+
| ----------- | ------------------ |
|
|
10426
|
+
| `namespace` | `string` \| `null` |
|
|
10427
|
+
|
|
10428
|
+
##### Returns
|
|
10429
|
+
|
|
10430
|
+
`string` \| `null`
|
|
10431
|
+
|
|
10432
|
+
##### Inherited from
|
|
10433
|
+
|
|
10434
|
+
`CharacterData.lookupPrefix`
|
|
10435
|
+
|
|
10436
|
+
#### normalize()
|
|
10437
|
+
|
|
10438
|
+
> **normalize**(): `void`
|
|
10439
|
+
|
|
10440
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:582
|
|
10441
|
+
|
|
10442
|
+
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous
|
|
10443
|
+
exclusive Text nodes into the first of their nodes.
|
|
10444
|
+
|
|
10445
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/normalize)
|
|
10446
|
+
|
|
10447
|
+
##### Returns
|
|
10448
|
+
|
|
10449
|
+
`void`
|
|
10450
|
+
|
|
10451
|
+
##### Inherited from
|
|
10452
|
+
|
|
10453
|
+
`CharacterData.normalize`
|
|
10454
|
+
|
|
10455
|
+
#### removeChild()
|
|
10456
|
+
|
|
10457
|
+
> **removeChild**(`child`): [`Node`](#node-1)
|
|
10458
|
+
|
|
10459
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:585
|
|
10460
|
+
|
|
10461
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/removeChild)
|
|
10462
|
+
|
|
10463
|
+
##### Parameters
|
|
10464
|
+
|
|
10465
|
+
| Parameter | Type |
|
|
10466
|
+
| --------- | ----------------- |
|
|
10467
|
+
| `child` | [`Node`](#node-1) |
|
|
10468
|
+
|
|
10469
|
+
##### Returns
|
|
10470
|
+
|
|
10471
|
+
[`Node`](#node-1)
|
|
10472
|
+
|
|
10473
|
+
##### Inherited from
|
|
10474
|
+
|
|
10475
|
+
`CharacterData.removeChild`
|
|
10476
|
+
|
|
10477
|
+
#### replaceChild()
|
|
10478
|
+
|
|
10479
|
+
> **replaceChild**(`node`, `child`): [`Node`](#node-1)
|
|
10480
|
+
|
|
10481
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:588
|
|
10482
|
+
|
|
10483
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/replaceChild)
|
|
10484
|
+
|
|
10485
|
+
##### Parameters
|
|
10486
|
+
|
|
10487
|
+
| Parameter | Type |
|
|
10488
|
+
| --------- | ----------------- |
|
|
10489
|
+
| `node` | [`Node`](#node-1) |
|
|
10490
|
+
| `child` | [`Node`](#node-1) |
|
|
10491
|
+
|
|
10492
|
+
##### Returns
|
|
10493
|
+
|
|
10494
|
+
[`Node`](#node-1)
|
|
10495
|
+
|
|
10496
|
+
##### Inherited from
|
|
10497
|
+
|
|
10498
|
+
`CharacterData.replaceChild`
|
|
10499
|
+
|
|
10500
|
+
#### replaceData()
|
|
10501
|
+
|
|
10502
|
+
> **replaceData**(`offset`, `count`, `data`): `void`
|
|
10503
|
+
|
|
10504
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1030
|
|
10505
|
+
|
|
10506
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/replaceData)
|
|
10507
|
+
|
|
10508
|
+
##### Parameters
|
|
10509
|
+
|
|
10510
|
+
| Parameter | Type |
|
|
10511
|
+
| --------- | -------- |
|
|
10512
|
+
| `offset` | `number` |
|
|
10513
|
+
| `count` | `number` |
|
|
10514
|
+
| `data` | `string` |
|
|
10515
|
+
|
|
10516
|
+
##### Returns
|
|
10517
|
+
|
|
10518
|
+
`void`
|
|
10519
|
+
|
|
10520
|
+
##### Inherited from
|
|
10521
|
+
|
|
10522
|
+
`CharacterData.replaceData`
|
|
10523
|
+
|
|
10524
|
+
#### splitText()
|
|
10525
|
+
|
|
10526
|
+
> **splitText**(`offset`): [`Text`](#text-1)
|
|
10527
|
+
|
|
10528
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1059
|
|
10529
|
+
|
|
10530
|
+
Splits data at the given offset and returns the remainder as Text node.
|
|
10531
|
+
|
|
10532
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Text/splitText)
|
|
10533
|
+
|
|
10534
|
+
##### Parameters
|
|
10535
|
+
|
|
10536
|
+
| Parameter | Type |
|
|
10537
|
+
| --------- | -------- |
|
|
10538
|
+
| `offset` | `number` |
|
|
10539
|
+
|
|
10540
|
+
##### Returns
|
|
10541
|
+
|
|
10542
|
+
[`Text`](#text-1)
|
|
10543
|
+
|
|
10544
|
+
#### substringData()
|
|
10545
|
+
|
|
10546
|
+
> **substringData**(`offset`, `count`): `string`
|
|
10547
|
+
|
|
10548
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1032
|
|
10549
|
+
|
|
10550
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData/substringData)
|
|
10551
|
+
|
|
10552
|
+
##### Parameters
|
|
10553
|
+
|
|
10554
|
+
| Parameter | Type |
|
|
10555
|
+
| --------- | -------- |
|
|
10556
|
+
| `offset` | `number` |
|
|
10557
|
+
| `count` | `number` |
|
|
10558
|
+
|
|
10559
|
+
##### Returns
|
|
10560
|
+
|
|
10561
|
+
`string`
|
|
10562
|
+
|
|
10563
|
+
##### Inherited from
|
|
10564
|
+
|
|
10565
|
+
`CharacterData.substringData`
|
|
10566
|
+
|
|
10567
|
+
---
|
|
10568
|
+
|
|
10569
|
+
## AdapterOptions\<A\>
|
|
10570
|
+
|
|
10571
|
+
> **AdapterOptions**\<`A`\> = `A` _extends_ [`EpubStorageAdapterClass`](#epubstorageadapterclass)\<infer Opts\> ? `Opts` : `object`
|
|
10572
|
+
|
|
10573
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L110)
|
|
10574
|
+
|
|
10575
|
+
### Type Parameters
|
|
10576
|
+
|
|
10577
|
+
| Type Parameter |
|
|
10578
|
+
| -------------- |
|
|
10579
|
+
| `A` |
|
|
10580
|
+
|
|
10581
|
+
---
|
|
10582
|
+
|
|
10583
|
+
## ArchiveSource
|
|
10584
|
+
|
|
10585
|
+
> **ArchiveSource** = `string` \| `Uint8Array` \| `Blob`
|
|
10586
|
+
|
|
10587
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:12](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L12)
|
|
10588
|
+
|
|
10589
|
+
---
|
|
10590
|
+
|
|
10591
|
+
## Attr
|
|
10592
|
+
|
|
10593
|
+
> **Attr** = `InstanceOf`\<[`Attr`](#attr-1)\>
|
|
10594
|
+
|
|
10595
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:664
|
|
10596
|
+
|
|
10597
|
+
A DOM element's attribute as an object. In most DOM methods, you will probably directly
|
|
10598
|
+
retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g.,
|
|
10599
|
+
Element.getAttributeNode()) or means of iterating give Attr types.
|
|
10600
|
+
|
|
10601
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Attr)
|
|
10602
|
+
|
|
10603
|
+
---
|
|
10604
|
+
|
|
10605
|
+
## Document
|
|
10606
|
+
|
|
10607
|
+
> **Document** = `InstanceOf`\<[`Document`](#document-1)\>
|
|
10608
|
+
|
|
10609
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1188
|
|
10610
|
+
|
|
10611
|
+
---
|
|
10612
|
+
|
|
10613
|
+
## DocumentType
|
|
10614
|
+
|
|
10615
|
+
> **DocumentType** = `InstanceOf`\<`DocumentFragment`\>
|
|
10616
|
+
|
|
10617
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:1431
|
|
10618
|
+
|
|
10619
|
+
---
|
|
10620
|
+
|
|
10621
|
+
## Element
|
|
10622
|
+
|
|
10623
|
+
> **Element** = `InstanceOf`\<[`Element`](#element-1)\>
|
|
10624
|
+
|
|
10625
|
+
Defined in: node_modules/@xmldom/xmldom/index.d.ts:842
|
|
10626
|
+
|
|
10627
|
+
Element is the most general base class from which all objects in a Document inherit. It only
|
|
10628
|
+
has methods and properties common to all kinds of elements. More specific classes inherit from
|
|
10629
|
+
Element.
|
|
10630
|
+
|
|
10631
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Element)
|
|
10632
|
+
|
|
10633
|
+
---
|
|
10634
|
+
|
|
10635
|
+
## EpubInstanceFor\<A\>
|
|
10636
|
+
|
|
10637
|
+
> **EpubInstanceFor**\<`A`\> = `A`\[`"capabilities"`\]\[`"writable"`\] _extends_ `true` ? [`Epub`](#epub) : [`EpubReader`](#epubreader)
|
|
10638
|
+
|
|
10639
|
+
Defined in: [libraries/epub/src/index.tsx:3325](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3325)
|
|
10640
|
+
|
|
10641
|
+
Resolves to [Epub](#epub) for writable adapters, [EpubReader](#epubreader) for read-only ones.
|
|
10642
|
+
|
|
10643
|
+
The conditional pivots on `capabilities.writable`, which must be a literal
|
|
10644
|
+
`true`/`false` on the adapter class (use `as const`) for inference to work.
|
|
10645
|
+
|
|
10646
|
+
### Type Parameters
|
|
10647
|
+
|
|
10648
|
+
| Type Parameter |
|
|
10649
|
+
| ------------------------------------------------------------------- |
|
|
10650
|
+
| `A` _extends_ [`EpubStorageAdapterClass`](#epubstorageadapterclass) |
|
|
10651
|
+
|
|
10652
|
+
---
|
|
10653
|
+
|
|
10654
|
+
## EpubMetadata
|
|
10655
|
+
|
|
10656
|
+
> **EpubMetadata** = [`MetadataEntry`](#metadataentry)[]
|
|
10657
|
+
|
|
10658
|
+
Defined in: [libraries/epub/src/index.tsx:124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L124)
|
|
10659
|
+
|
|
10660
|
+
---
|
|
10661
|
+
|
|
10662
|
+
## EpubReader
|
|
10663
|
+
|
|
10664
|
+
> **EpubReader** = `Pick`\<[`Epub`](#epub), `"storage"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"resolveHref"` \| `"readFileContents"` \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"discardAndClose"` \| `Extract`\<keyof [`Epub`](#epub), `` `get${string}` ``\>\> & `Disposable`
|
|
10665
|
+
|
|
10666
|
+
Defined in: [libraries/epub/src/index.tsx:222](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L222)
|
|
10667
|
+
|
|
10668
|
+
Read-only view of an EPUB
|
|
10669
|
+
Returned by Epub.using(MemoryAdapter).from(...) and by Epub.from(path, { readonly: true })
|
|
10670
|
+
|
|
10671
|
+
---
|
|
10672
|
+
|
|
10673
|
+
## EpubStorageKind
|
|
10674
|
+
|
|
10675
|
+
> **EpubStorageKind** = `"tmp-dir"` \| `"in-memory"` \| `string` & `object`
|
|
10676
|
+
|
|
10677
|
+
Defined in: [libraries/epub/src/adapters/interface.ts:10](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/adapters/interface.ts#L10)
|
|
10678
|
+
|
|
10679
|
+
Pluggable storage backend for an Epub instance
|
|
10680
|
+
|
|
10681
|
+
Built-in adapters:
|
|
10682
|
+
|
|
10683
|
+
- [TmpFsAdapter](#tmpfsadapter) extracts the archive to a tmp directory and
|
|
10684
|
+
supports the full read/write/save/upgrade
|
|
10685
|
+
- [MemoryAdapter](#memoryadapter) keeps an in-memory zip handle and supports
|
|
10686
|
+
reads only
|
|
10687
|
+
|
|
10688
|
+
---
|
|
10689
|
+
|
|
10690
|
+
## InMemoryEpubReader
|
|
10691
|
+
|
|
10692
|
+
> **InMemoryEpubReader** = [`EpubReader`](#epubreader) & `object`
|
|
10693
|
+
|
|
10694
|
+
Defined in: [libraries/epub/src/index.tsx:240](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L240)
|
|
10695
|
+
|
|
10696
|
+
Readonly Epub-instance backed by an in-memory zip handle
|
|
10697
|
+
Returned by `Epub.using(MemoryAdapter).from(...)`
|
|
10698
|
+
|
|
10699
|
+
### Type Declaration
|
|
10700
|
+
|
|
10701
|
+
#### storage
|
|
10702
|
+
|
|
10703
|
+
> `readonly` **storage**: `"in-memory"`
|
|
10704
|
+
|
|
10705
|
+
---
|
|
10706
|
+
|
|
10707
|
+
## ManifestItem
|
|
10708
|
+
|
|
10709
|
+
> **ManifestItem** = `object`
|
|
10710
|
+
|
|
10711
|
+
Defined in: [libraries/epub/src/index.tsx:107](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L107)
|
|
10712
|
+
|
|
10713
|
+
### Properties
|
|
10714
|
+
|
|
10715
|
+
#### fallback?
|
|
10716
|
+
|
|
10717
|
+
> `optional` **fallback**: `string`
|
|
10718
|
+
|
|
10719
|
+
Defined in: [libraries/epub/src/index.tsx:112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L112)
|
|
10720
|
+
|
|
10721
|
+
#### href
|
|
10722
|
+
|
|
10723
|
+
> **href**: `string`
|
|
10724
|
+
|
|
10725
|
+
Defined in: [libraries/epub/src/index.tsx:109](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/li
|