Merge pull request #5776 from Gaubee/fix/headless-bun-deno-compat

Fix @xterm/headless compatibility with Bun and Deno runtimes
This commit is contained in:
Daniel Imms
2026-03-26 08:05:03 -07:00
committed by GitHub
+1 -2
View File
@@ -3,7 +3,6 @@
* @license MIT
*/
import { isNode } from 'common/Platform';
import type { ILogService } from 'common/services/Services';
interface ITaskQueue {
@@ -148,7 +147,7 @@ class IdleTaskQueueInternal extends TaskQueue {
* This reverts to a {@link PriorityTaskQueue} if the environment does not support idle callbacks.
*/
// eslint-disable-next-line @typescript-eslint/naming-convention
export const IdleTaskQueue = (!isNode && 'requestIdleCallback' in window) ? IdleTaskQueueInternal : PriorityTaskQueue;
export const IdleTaskQueue = ('requestIdleCallback' in globalThis) ? IdleTaskQueueInternal : PriorityTaskQueue;
/**
* An object that tracks a single debounced task that will run on the next idle frame. When called