Skip to content

Commit 858c3a8

Browse files
authored
Merge pull request #1232 from kianmeng/fix-typos
Fix typos
2 parents 5c61014 + 851304f commit 858c3a8

File tree

13 files changed

+32
-32
lines changed

13 files changed

+32
-32
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Scrolled: `book.renderTo("area", { flow: "scrolled-doc" });`
9292

9393
[Scripted content](https://www.w3.org/TR/epub-33/#sec-scripted-content), JavasScript the ePub HTML content, is disabled by default due to the potential for executing malicious content.
9494

95-
This is done by sandboxing the iframe the content is rendered into, though it is still recommened to santize the ePub content server-side as well.
95+
This is done by sandboxing the iframe the content is rendered into, though it is still recommended to sanitize the ePub content server-side as well.
9696

9797
If a trusted ePub contains interactivity, it can be enabled by passing `allowScriptedContent: true` to the `Rendition` settings.
9898

documentation/md/API.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Returns **[Range](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Inpu
150150

151151
### key
152152

153-
Generates the Book Key using the identifer in the manifest or other string provided
153+
Generates the Book Key using the identifier in the manifest or other string provided
154154

155155
**Parameters**
156156

@@ -350,7 +350,7 @@ Returns **[Section](#section)** last section
350350

351351
Represents a Section of the Book
352352

353-
In most books this is equivelent to a Chapter
353+
In most books this is equivalent to a Chapter
354354

355355
**Parameters**
356356

@@ -389,8 +389,8 @@ Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refere
389389

390390
### reconcileLayoutSettings
391391

392-
Reconciles the current chapters layout properies with
393-
the global layout properities.
392+
Reconciles the current chapters layout properties with
393+
the global layout properties.
394394

395395
**Parameters**
396396

@@ -839,7 +839,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
839839

840840
### revokeUrl
841841

842-
Revoke Temp Url for a achive item
842+
Revoke Temp Url for a archive item
843843

844844
**Parameters**
845845

@@ -1077,7 +1077,7 @@ A Rendered Location Range
10771077

10781078
Hooks allow for injecting functions that must all complete in order before finishing
10791079
They will execute in parallel but all must finish before continuing
1080-
Functions may return a promise if they are asycn.
1080+
Functions may return a promise if they are async.
10811081

10821082
**Parameters**
10831083

@@ -2066,7 +2066,7 @@ Returns **BoundingClientRect**
20662066

20672067
### windowBounds
20682068

2069-
Find the equivelent of getBoundingClientRect of a browser window
2069+
Find the equivalent of getBoundingClientRect of a browser window
20702070

20712071
Returns **{width: [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number), height: [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number), top: [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number), left: [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number), right: [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number), bottom: [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)}**
20722072

@@ -2225,7 +2225,7 @@ Create a treeWalker
22252225

22262226
- `root` **[element](https://developer.mozilla.org/en-US/docs/Web/API/Element)** element to start with
22272227
- `func` **[function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** function to run on each element
2228-
- `filter` **([function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) \| [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** funtion or object to filter with
2228+
- `filter` **([function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) \| [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** function or object to filter with
22292229

22302230
### walk
22312231

@@ -2264,7 +2264,7 @@ Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refere
22642264

22652265
### findChildren
22662266

2267-
Find direct decendents of an element
2267+
Find direct descendents of an element
22682268

22692269
**Parameters**
22702270

@@ -2284,7 +2284,7 @@ Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refere
22842284

22852285
### filterChildren
22862286

2287-
Find all direct decendents of a specific type
2287+
Find all direct descendents of a specific type
22882288

22892289
**Parameters**
22902290

src/archive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class Archive {
233233
}
234234

235235
/**
236-
* Revoke Temp Url for a achive item
236+
* Revoke Temp Url for a archive item
237237
* @param {string} url url of the item in the archive
238238
*/
239239
revokeUrl(url){

src/book.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ class Book {
714714
}
715715

716716
/**
717-
* Generates the Book Key using the identifer in the manifest or other string provided
717+
* Generates the Book Key using the identifier in the manifest or other string provided
718718
* @param {string} [identifier] to use instead of metadata identifier
719719
* @return {string} key
720720
*/

src/epubcfi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class EpubCFI {
109109
}
110110

111111
if(cfiStr.indexOf("epubcfi(") === 0 && cfiStr[cfiStr.length-1] === ")") {
112-
// Remove intial epubcfi( and ending )
112+
// Remove initial epubcfi( and ending )
113113
cfiStr = cfiStr.slice(8, cfiStr.length-1);
114114
}
115115

@@ -395,7 +395,7 @@ class EpubCFI {
395395
return -1;
396396
}
397397

398-
// Compare the charecter offset of the text node
398+
// Compare the character offset of the text node
399399
if(terminalA.offset > terminalB.offset) {
400400
return 1;
401401
}

src/mapping.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Mapping {
7373
walk(root, func) {
7474
// IE11 has strange issue, if root is text node IE throws exception on
7575
// calling treeWalker.nextNode(), saying
76-
// Unexpected call to method or property access instead of returing null value
76+
// Unexpected call to method or property access instead of returning null value
7777
if(root && root.nodeType === Node.TEXT_NODE) {
7878
return;
7979
}

src/packaging.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class Packaging {
157157

158158
// var epubcfi = new EpubCFI();
159159

160-
//-- Add to array to mantain ordering and cross reference with manifest
160+
//-- Add to array to maintain ordering and cross reference with manifest
161161
items.forEach(function(item, index){
162162
var idref = item.getAttribute("idref");
163163
// var cfiBase = epubcfi.generateChapterComponent(spineNodeIndex, index, Id);
@@ -213,7 +213,7 @@ class Packaging {
213213
*/
214214
findNavPath(manifestNode){
215215
// Find item with property "nav"
216-
// Should catch nav irregardless of order
216+
// Should catch nav regardless of order
217217
// var node = manifestNode.querySelector("item[properties$='nav'], item[properties^='nav '], item[properties*=' nav ']");
218218
var node = qsp(manifestNode, "item", {"properties":"nav"});
219219
return node ? node.getAttribute("href") : false;

src/rendition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ class Rendition {
895895
*/
896896
triggerSelectedEvent(cfirange, contents){
897897
/**
898-
* Emit that a text selection has occured
898+
* Emit that a text selection has occurred
899899
* @event selected
900900
* @param {string} cfirange
901901
* @param {Contents} contents

src/section.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { DOMParser as XMLDOMSerializer } from "@xmldom/xmldom";
99
/**
1010
* Represents a Section of the Book
1111
*
12-
* In most books this is equivelent to a Chapter
12+
* In most books this is equivalent to a Chapter
1313
* @param {object} item The spine item representing the section
1414
* @param {object} hooks hooks for serialize and content
1515
*/
@@ -179,7 +179,7 @@ class Section {
179179
/**
180180
* Search a string in multiple sequential Element of the section. If the document.createTreeWalker api is missed(eg: IE8), use `find` as a fallback.
181181
* @param {string} _query The query string to search
182-
* @param {int} maxSeqEle The maximum number of Element that are combined for search, defualt value is 5.
182+
* @param {int} maxSeqEle The maximum number of Element that are combined for search, default value is 5.
183183
* @return {object[]} A list of matches, with form {cfi, excerpt}
184184
*/
185185
search(_query , maxSeqEle = 5){
@@ -245,8 +245,8 @@ class Section {
245245
}
246246

247247
/**
248-
* Reconciles the current chapters layout properies with
249-
* the global layout properities.
248+
* Reconciles the current chapters layout properties with
249+
* the global layout properties.
250250
* @param {object} globalLayout The global layout settings object, chapter properties string
251251
* @return {object} layoutProperties Object with layout properties
252252
*/

src/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ class Store {
360360
}
361361

362362
/**
363-
* Revoke Temp Url for a achive item
363+
* Revoke Temp Url for a archive item
364364
* @param {string} url url of the item in the store
365365
*/
366366
revokeUrl(url){

0 commit comments

Comments
 (0)