Skip to content

how to run xterm-headless without nodejs #5248

Answered by jerch
BinaryRyan asked this question in Q&A
Discussion options

You must be logged in to vote

Hmm, in theory this should be possible as xterm.js does not rely on specific parts of the node env per se. We have only one place, where we deduct the underlying platform in src/common/Platform.ts. As you can see there you'd get node behavior by defining a global process object.
To find follow-ups in the code you can search for isNode and check impl details at the occasions and whether you can polyfill it in your JS engine. A quick search myself revealed only one impl switch here:

export const IdleTaskQueue = (!isNode && 'requestIdleCallback' in window) ? IdleTaskQueueInternal : PriorityTaskQueue;

Idk if the bundler fo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BinaryRyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants