Skip to content

Implement TextEncoder and TextDecoder #2524

@chyzwar

Description

@chyzwar

TextEncoder and TextDecoder are added as globals in node11.
Maybe it is possible to use these for jsdom?

https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder
https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder

https://nodejs.org/api/globals.html#globals_textdecoder
https://nodejs.org/api/globals.html#globals_textencoder

I made a change in jest to support these in jest-environment-node. jestjs/jest#8022 I can make simmilar change in jsdom but I am not sure were it should be done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions