Let the optional script-realm service install itself on the active page loader. Keep Main independent of Cordis and detach the registry without disturbing resident package windows.
description, kind
| description | kind |
|---|---|
| Provide optional same-origin iframe script environments through the Realm registry. | package-reference |
@deepseek-ai/dsh-client-script-realm-iframe
English | 中文
Summary
Use this provider when framework code explicitly needs a separate browser global environment with direct object references. Loading the plugin registers the iframe factory without allocating a frame. Application plugins keep the Main environment unless their Loader entry requests script isolation; Client modules then creates one frame per such package through this factory.
Table of Contents
- Use this package
- Understand the implementation
- Further Exploration
- Model Experience
- Known Limitations and Deferred Work
- Dev Note
Use this package
The normal Client plugin injects scriptRealms and registers its factory. A composition must supply the registry; the default Web roster includes both packages as ordinary, non-stage-one entries. The provider accepts no configuration.
Understand the implementation
Each request creates a hidden same-origin iframe. expose() installs direct references without replacing existing or reserved globals. execute() loads an external classic script, resolving relative URLs against the provider page. Cancellation or disposal rejects pending executions and removes the frame. Callers retain responsibility for disposing created instances.
Further Exploration
Model Experience
None, as this optional browser infrastructure registers no model-facing tools or prompts.
KV Cache effect
None; this package neither assembles nor sends a provider request.
Known Limitations and Deferred Work
- Same-origin access is not hostile-code isolation. Native
window,document, viewport, timers, and DOM constructors belong to the iframe; no transparent main-page emulation is provided. Pooling, grouping several packages in one frame, and Shadow DOM are deferred.
Dev Note
None.