Skip to main content

BrowserWindow

An interactive webpage inside a browser frame.

The page runs in an iframe with its own document and JavaScript context.

import { BrowserWindow } from "stageroutine";

const browser = BrowserWindow({
url: "../browser-demo/index.html",
title: "Application demo",
position: "center",
width: 120,
height: 65,
origin: "center",
});

Default size: 120 × 65 stage units. interactive: false disables page input (default: true).

Assign a new url to load another page:

browser.url = "http://localhost:3000/settings";

Back and Forward use the browser’s Navigation API. Address updates read the iframe’s current URL. These controls work when the page shares the presentation’s protocol, host, and port. For other sites, the address shows the configured URL and history buttons stay disabled.

Reload opens the configured URL again. The address links to the displayed URL in a new tab.

Click outside the window to return keyboard control to the presentation.

Embedding limits​

The page must allow iframe embedding. Sites can block it with X-Frame-Options or CSP frame-ancestors. Blocked pages may remain on the loading screen. See iframe embedding limits.

See the BrowserWindow API reference for all options.