diff options
Diffstat (limited to 'lib/epub.js/src/utils')
-rw-r--r-- | lib/epub.js/src/utils/core.js | 14 | ||||
-rw-r--r-- | lib/epub.js/src/utils/hook.js | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/epub.js/src/utils/core.js b/lib/epub.js/src/utils/core.js index 5c83944..9490207 100644 --- a/lib/epub.js/src/utils/core.js +++ b/lib/epub.js/src/utils/core.js @@ -2,7 +2,7 @@ * Core Utilities and Helpers * @module Core */ -import { DOMParser as XMLDOMParser } from "xmldom"; +import { DOMParser as XMLDOMParser } from "@xmldom/xmldom"; /** * Vendor prefixed requestAnimationFrame @@ -322,7 +322,7 @@ export function nodeBounds(node) { } /** - * Find the equivelent of getBoundingClientRect of a browser window + * Find the equivalent of getBoundingClientRect of a browser window * @returns {{ width: Number, height: Number, top: Number, left: Number, right: Number, bottom: Number }} * @memberof Core */ @@ -447,7 +447,7 @@ export function createBase64Url(content, mime){ return; } - data = btoa(encodeURIComponent(content)); + data = btoa(content); datauri = "data:" + mime + ";base64," + data; @@ -590,7 +590,7 @@ export function sprint(root, func) { * @memberof Core * @param {element} root element to start with * @param {function} func function to run on each element - * @param {function | object} filter funtion or object to filter with + * @param {function | object} filter function or object to filter with */ export function treeWalker(root, func, filter) { var treeWalker = document.createTreeWalker(root, filter, null, false); @@ -653,7 +653,7 @@ export function defer() { */ this.resolve = null; - /* A method to reject the assocaited Promise with the value passed. + /* A method to reject the associated Promise with the value passed. * If the promise is already settled it does nothing. * * @param {anything} reason: The reason for the rejection of the Promise. @@ -702,7 +702,7 @@ export function querySelectorByType(html, element, type){ } /** - * Find direct decendents of an element + * Find direct descendents of an element * @param {element} el * @returns {element[]} children * @memberof Core @@ -734,7 +734,7 @@ export function parents(node) { } /** - * Find all direct decendents of a specific type + * Find all direct descendents of a specific type * @param {element} el * @param {string} nodeName * @param {boolean} [single] diff --git a/lib/epub.js/src/utils/hook.js b/lib/epub.js/src/utils/hook.js index ea1b901..85f4463 100644 --- a/lib/epub.js/src/utils/hook.js +++ b/lib/epub.js/src/utils/hook.js @@ -1,7 +1,7 @@ /** * Hooks allow for injecting functions that must all complete in order before finishing * They will execute in parallel but all must finish before continuing - * Functions may return a promise if they are asycn. + * Functions may return a promise if they are async. * @param {any} context scope of this * @example this.content = new EPUBJS.Hook(this); */ |