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

Support TextEncoder & TextDecoder #1611

Closed
Ayc0 opened this issue Nov 13, 2024 · 0 comments · Fixed by #1612
Closed

Support TextEncoder & TextDecoder #1611

Ayc0 opened this issue Nov 13, 2024 · 0 comments · Fixed by #1612
Labels
enhancement New feature or request

Comments

@Ayc0
Copy link
Contributor

Ayc0 commented Nov 13, 2024

Is your feature request related to a problem? Please describe.

On the global scope, TextEncoder & TextDecoder are available (see MDN).

But when I run this code:

const h = require('happy-dom');
const w = new h.Window();
w.TextEncoder // undefined

This poses an issue for tests running in Jest with @happy-dom/jest-environment, testing code using TextEncoder

Describe the solution you'd like
Implement those 2 globals by exposing those from node:util

Describe alternatives you've considered
N/A

Additional context
N/A

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

Successfully merging a pull request may close this issue.

1 participant