Skip to content

Commit

Permalink
lib: import TextEncoder and TextDecoder from internal/encoding
Browse files Browse the repository at this point in the history
PR-URL: #26547
Refs: #26546
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
joyeecheung committed Mar 12, 2019
1 parent 7ac904e commit 4562697
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/bootstrap/node.js
Expand Up @@ -189,7 +189,9 @@ if (!config.noBrowserGlobals) {
// https://url.spec.whatwg.org/#urlsearchparams
exposeInterface(global, 'URLSearchParams', URLSearchParams);

const { TextEncoder, TextDecoder } = NativeModule.require('util');
const {
TextEncoder, TextDecoder
} = NativeModule.require('internal/encoding');
// https://encoding.spec.whatwg.org/#textencoder
exposeInterface(global, 'TextEncoder', TextEncoder);
// https://encoding.spec.whatwg.org/#textdecoder
Expand Down

0 comments on commit 4562697

Please sign in to comment.