-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8365641
commit f80b3cd
Showing
8 changed files
with
222 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,38 @@ | ||
export default class Dom { | ||
/** | ||
* Get the body of an HTML string | ||
* | ||
* @param html The html to parse | ||
* @param removeScripts Whether to remove scripts from the html | ||
* @returns The body of the html | ||
*/ | ||
static getBody(html: string, removeScripts?: boolean): HTMLElement; | ||
/** | ||
* Get the type for a node | ||
* @param {HTMLElement} node The node | ||
* @return {String} The type | ||
*/ | ||
static getNodeType(node: HTMLElement): string; | ||
/** | ||
* Get the content from a node | ||
* @param {Node} node The node | ||
* @return {String} The type | ||
*/ | ||
static getNodeContent(node: HTMLElement): string | null; | ||
/** | ||
* Diff the DOM from a string and an element | ||
* | ||
* @param newNode The new node | ||
* @param oldNode The old node | ||
* @returns The diffed node | ||
*/ | ||
static diff(newNode: string, oldNode: HTMLElement): void; | ||
/** | ||
* Diff the DOM from two elements | ||
* | ||
* @param newNode The new node | ||
* @param oldNode The old node | ||
* @returns The diffed node | ||
*/ | ||
static diffElements(newNode: HTMLElement, oldNode: HTMLElement): void; | ||
static getBody(html: string, removeScripts?: boolean): HTMLElement; | ||
static flattenDomIntoArray(node: HTMLElement): HTMLCollection; | ||
static compareNodesAndReturnChanges(newNode: HTMLElement, oldNode: HTMLElement): Record<string, Element | null>[]; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.