# Window A **WindowApplication** — the object returned by `wm.open(...)` — is one live window in the SGApps window-manager. It owns a DOM node, a header, a content section, and a lifecycle (open → focus/blur → close). Every method below is bound directly on the returned instance; there are no factories or handles in between. Related: [Window Manager](window-manager.md) covers how to open one; [Dialogs](dialogs.md) covers modal-child windows spawned from any window instance. ## Try it live The buttons below open real WM windows in this page. First click loads the SDK via `exporter.js` (~1 s); subsequent clicks reuse the same window-manager instance. Close a window via its × button or use "Close all demo windows" below to clear them. **Open blank windows** — a plain WM window whose `container()` you fill with your own DOM:
**Open full apps** — real SGApps applications booted inside the b2b runtime. First click loads the app module (~1-3 s per app):
> **Behind the scenes:** the boot script shims `Application.notifyService()` (which many full apps expect but the bare b2b runtime doesn't ship) with the real notify service when available, or `console` as a fallback. In your own integration, load `elements/notify-service` and bind it via `App.bind("notifyService", …)` — see the source of `/scripts/application.js:113-131` for the reference implementation. **State & chrome:**
**Cleanup:**
## Obtaining a window ```js // 1. Open a new one from the window-manager var win = wm.open({ run: ["code-editor"], width: 900, height: 600 }); // 2. From inside an SGApps app, the app's own window is available // via `this.window()` (in a WindowApplicationInterface constructor) var win = this.window(); // 3. Iterate every open window in the manager wm.windows().forEach(function (w) { console.log(w.title()); }); ``` ## Method reference Every getter/setter uses the same pattern: **call with no argument → read**, **call with a value → write and return the value**. ### Identity & DOM access | Method | Description | |---|---| | `win.node()` | Root `
` DOM element | | `win.header()` | `
` element (title bar) | | `win.footer()` | `