Skip to content

Window

Terminal window
carbon add plugin Window
import { WebviewWindow } from '@dotcarbon/plugin-window'
const window = await WebviewWindow.create({
label: 'settings',
title: 'Settings',
url: 'settings.html',
width: 720,
height: 520,
capabilities: ['settings'],
})
await window.center()
await window.setAlwaysOnTop(true)
const state = await window.getState()

Static methods include create, getCurrent, getByLabel, and getAll. Window handles expose state, title, size, position, center, minimize, maximize, unmaximize, fullscreen, always-on-top, resizable, and close operations.

Commands default to the calling window when no label is supplied. Capability checks still use the originating webview, so creating a privileged window does not grant its permissions to the caller.