Remote DOM: Isolate UI Rendering with Sandboxed JavaScript Environments
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Remote DOM, developed by Shopify, enables rendering DOM elements created in a sandboxed JavaScript environment directly to the main DOM. This allows for isolating potentially untrusted code off the main thread, while still providing a controlled set of UI elements to the main page. It facilitates synchronizing UI between environments like iframes or Web Workers and the top-level page, supporting various JavaScript frameworks for flexible and performant web applications.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Remote DOM is a powerful library developed by Shopify that allows developers to render a tree of DOM elements created in a sandboxed JavaScript environment directly to the DOM in a different JavaScript environment. This innovative approach enables the isolation of potentially untrusted code off the main thread, while still allowing it to render a controlled set of UI elements to the main page.
The library is particularly useful for synchronizing elements between a hidden <iframe> and the top-level page, or for leveraging Web Workers to run JavaScript libraries that typically require a top-level HTML page, such as Preact or Svelte. Remote DOM also offers a minimal polyfill of key DOM APIs to facilitate more lightweight sandboxed environments.
Installation
To integrate Remote DOM into your project, you'll need a web project capable of running two JavaScript environments: the "host" environment (main HTML page) and the "remote" environment (sandboxed). The core package, @remote-dom/core, is essential for establishing the connection between these environments.
You can install it using your preferred package manager:
# npm
npm install @remote-dom/core --save
# pnpm
pnpm install @remote-dom/core --save
# yarn
yarn add @remote-dom/core
After installation, you will set up a "receiver" on your host page to process updates from the remote environment and a RemoteMutationObserver in your remote environment to communicate changes back to the host.
Examples
Remote DOM provides several examples to help you get started and understand its capabilities:
- Getting started: Demonstrates the most basic usage, synchronizing text content between a main page and an
<iframe>. - Custom element: Extends the basic example to show how a sandboxed environment can render custom button elements, including handling attributes and events.
- The “kitchen sink”: A comprehensive example showcasing a fully-featured implementation of Remote DOM. This includes custom elements with properties, events, and methods, and the ability to sandbox UI in a web worker. It features implementations in vanilla JavaScript, htm, Preact, React, Svelte, and Vue.
These examples highlight the flexibility of Remote DOM, allowing you to mix and match various host and remote technologies without being tied to a specific JavaScript framework.
Why Use Remote DOM?
Remote DOM offers significant advantages for modern web development:
- UI Isolation: It allows you to run potentially untrusted or complex UI logic in a sandboxed environment, protecting the main thread from performance bottlenecks or security risks.
- Performance: By offloading rendering tasks to Web Workers or iframes, Remote DOM helps keep the main thread free, leading to a smoother and more responsive user experience.
- Framework Agnosticism: The library is designed to work with any JavaScript framework or backend technology, providing a flexible solution for various project setups.
- Controlled UI: Through the use of custom elements and an allowlist approach, you maintain tight control over the visual appearance and functionality of elements rendered from the remote environment.
Links
- GitHub Repository: https://github.com/Shopify/remote-dom
- Core Package Documentation: https://github.com/Shopify/remote-dom/tree/main/packages/core/
- Contributing Guide: https://github.com/Shopify/remote-dom/blob/main/CONTRIBUTING.md
Related repositories
Similar repositories that may be relevant next.

MetaMCP: Unifying Model Context Protocol Servers with an All-in-One Gateway
August 19, 2026
MetaMCP is a powerful, self-hosted solution that acts as an aggregator, orchestrator, middleware, and gateway for Model Context Protocol (MCP) servers. It allows developers to dynamically combine multiple MCP servers into a single, unified endpoint, enhancing tool management and agent development. This TypeScript-based project simplifies the deployment and management of AI tools within a Dockerized environment.

microsoft/skills: Empowering AI Coding Agents with Domain-Specific Knowledge
August 19, 2026
The microsoft/skills repository provides a comprehensive collection of skills, custom agents, and configurations designed to enhance AI coding agents. It offers domain-specific knowledge for working with Azure SDKs and Microsoft AI Foundry, enabling more effective and context-driven development. Developers can leverage these resources to ground agents like GitHub Copilot with specialized expertise.

ClawHub: The Public Skill and Plugin Registry for OpenClaw
August 19, 2026
ClawHub is the public skill and plugin registry for OpenClaw, designed for publishing, versioning, and searching text-based agent skills and code plugins. It offers fast browsing, a CLI-friendly API, moderation hooks, and vector search capabilities. This platform streamlines the discovery and management of resources for the OpenClaw ecosystem.

code-session-memory: Automatic Vector Memory for AI Coding Sessions
August 15, 2026
code-session-memory provides automatic vector memory for various AI coding tools like OpenCode, Claude Code, Cursor, VS Code, Codex, and Gemini CLI. It indexes new messages into a vector database after each AI agent turn, enabling semantic search across all your past coding sessions. This tool ensures memory is shared across different platforms, enhancing developer productivity.
Source repository
Open the original repository on GitHub.
14 counted GitHub visits