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 <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
joyeecheung authored and BridgeAR committed Mar 14, 2019
1 parent 1de9e13 commit f128008
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,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 f128008

Please sign in to comment.