Showcase Playground Spawn
live · vanilla js · zero deps

window.magic

Every window is a door. This page is a laboratory for the browser window itself — resize it, drag it, spawn real popups, and watch the particle field and telemetry react in real time.

Open the playground
innerWidth
—
innerHeight
—
devicePixelRatio
—
scrollY
—
pointer
—
local time
—
Scroll into the window
drag me
living-window.html ⌘ drag

A window inside the window.

This panel is draggable, scrollable and fully alive. Its scroll position is reported below — proof that a "window" is just another element with opinions.

nested scroll
scroll the panel, not the page

Try dragging the title bar. The whole card follows your pointer and the page keeps scrolling underneath it.

pointer events
captured, not guessed

That's the whole trick: setPointerCapture, a transform, and a little restraint.

inner scroll 0% x 0 · y 0 idle
01 — the object

The window is the interface.

Most sites treat the browser as a piece of paper. It isn't. It has a viewport, a scroll position, a device pixel ratio, a title, storage, and the ability to open more of itself.

This build leans into all of it: the chrome you're looking at is a fixed window frame, the rail on the right is your scroll position, and the URL up top rewrites itself as you move through the page.

Try it — resize this browser, drag the card, then scroll the page and watch the frame's percentage climb.

02 — the playground

Poke the API.

These aren't screenshots. Every card below reads or writes a real browser property, live.

document.title

Rewrite this tab. The change is real.

—
the tab above your browser is the source of truth

localStorage

Persist a key across reloads.

—

navigator.languages

What your browser says about you.

—

screen & performance

Display and load timing.

—

pointer tracker

Move your mouse anywhere.

—
coordinates are viewport-relative

window.scrollTo()

Programmatic scrolling, with easing.

—
03 — the door

Spawn a real window.

Not an iframe. A separate window.open() document with its own title, its own DOM, and a channel back to this page.

The child window runs a tiny page of its own. Type in it, press ping, and the message lands in this log through BroadcastChannel.

— no windows spawned yet

window.open(…)

open( "", "wm-child", "popup,width=460,height=560" )
If nothing opens, your browser blocked the popup — allow popups for this origin and try again. Serving over http:// is more reliable than file://.
status: no child attached