-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Due to parsing issues, see: - capricorn86/happy-dom#1126 - capricorn86/happy-dom#1039 - capricorn86/happy-dom#1237 - capricorn86/happy-dom#954
- Loading branch information
Showing
6 changed files
with
13 additions
and
8 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
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
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
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
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,10 +1,8 @@ | ||
import { Window, XMLParser } from 'happy-dom'; | ||
|
||
const { document } = new Window(); | ||
import { JSDOM } from 'jsdom'; | ||
|
||
/** | ||
* Parse a string of HTML or XML to a DOM tree. | ||
* @param {string} [html] String containing HTML or XML to be parsed. | ||
* @returns {DocumentFragment} Object containing Node structure of HTML/XML parsed. | ||
*/ | ||
export const parse = (html) => XMLParser.parse(document, html); | ||
export const parse = (html) => JSDOM.fragment(html); |
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