Closed mhofman closed 10 months ago
Console taming assumes that if globalThis.process exists, then we're in node, and get to use some process APIs like .on() .exit() etc. https://github.com/endojs/endo/blob/2179108cb9247e9499c1f319de907d7cd365f314/packages/ses/src/error/tame-console.js#L97-L126
globalThis.process
process
.on()
.exit()
If globalThis.process is shimmed with something like {env: {FOO: 'bar'}}, then loading SES fails with globalThis.process.on is not a function.
{env: {FOO: 'bar'}}
globalThis.process.on
Console taming should more fully feature test the Node features it expects
Browser
Describe the bug
Console taming assumes that if
globalThis.process
exists, then we're in node, and get to use someprocess
APIs like.on()
.exit()
etc. https://github.com/endojs/endo/blob/2179108cb9247e9499c1f319de907d7cd365f314/packages/ses/src/error/tame-console.js#L97-L126If
globalThis.process
is shimmed with something like{env: {FOO: 'bar'}}
, then loading SES fails withglobalThis.process.on
is not a function.Expected behavior
Console taming should more fully feature test the Node features it expects
Platform environment
Browser
Screenshots