Skip to content

Expose DedicatedWorkerGlobalScope identity - #174

Merged
wieslawsoltes merged 1 commit into
stack/iframe-worker-extension-hostfrom
stack/dedicated-worker-global
Sep 16, 2026
Merged

wieslawsoltes merged 1 commit into
stack/iframe-worker-extension-hostfrom
stack/dedicated-worker-global

Conversation

@wieslawsoltes

@wieslawsoltes wieslawsoltes commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Problem and change

Code OSS detects a browser worker through self.constructor.name === 'DedicatedWorkerGlobalScope'. Without browser-compatible worker-global identity it selects its Node loader, attempts import('module'), and reports the paired bare-module rejection and Monaco worker fallback.

This layer installs the browser interface chain DedicatedWorkerGlobalScope -> WorkerGlobalScope -> EventTarget in every dedicated worker realm. Both interface constructors are illegal to invoke directly, and the global exposes the expected constructor, instanceof behavior, and [object DedicatedWorkerGlobalScope] string tag while retaining the isolated runtime and bounded messaging implementation.

The module-worker contract uses the Code OSS loader decision and proves that the worker path is selected.

Focused validation on the cumulative stack:

  • module-worker clone/global contract: 10/10 assertions;
  • cumulative worker/MessagePort hybrid filter, including throughput and queue bounds: passed.

Stack: #172 -> #173 -> #174 -> #175. This is layer 3 of 4, based on #173. Reconstructs the focused behavior from #110 on current main.

Advances #108 and #81. Both issues remain open for rebuilt packaged Monaco and browser-extension acceptance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant