Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider replacing jsdom #27

Open
jackdbd opened this issue Jan 3, 2024 · 1 comment
Open

Consider replacing jsdom #27

jackdbd opened this issue Jan 3, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jackdbd
Copy link
Owner

jackdbd commented Jan 3, 2024

eleventy-plugin-text-to-speech evaluates CSS selectors and XPath expressions to select nodes in a HTML document. At the moment I am using jsdom for this.

Since jsdom is quite big I'm considering replacing it.

jsdom declares canvas as an optional peer dependency. Since I don't need canvas support, I don't have to declare canvas as a dependency in eleventy-plugin-text-to-speech, and I don't need this potential replacement to have canvas support.

Potential jsdom replacements that come to mind:

@jackdbd jackdbd added the enhancement New feature or request label Jan 3, 2024
@jackdbd jackdbd self-assigned this Jan 3, 2024
@jackdbd jackdbd changed the title Consider replacing jsdom with happy-dom Consider replacing jsdom Jan 25, 2024
@jackdbd
Copy link
Owner Author

jackdbd commented Jan 25, 2024

At the moment happy-dom does not support XPath: capricorn86/happy-dom#1125

Since Eleventy depends on PostHTML, probably the best alternative to jsdom would be a combination of posthml-parser + xpath + posthtml-insert-at.

@jackdbd jackdbd pinned this issue Jan 25, 2024
@jackdbd jackdbd unpinned this issue Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant