v150 · sub apps
Install response map
window.subApps.add() takes a list of install paths and resolves to a SubAppsAddResponse that reports each path's fate separately: installedApps maps a path to the new sub app's ManifestId, and failedApps maps a path to the DOMException that stopped it. This demo builds that batch, calls the real API, and maps the response path-by-path.
window.subApps.add() only exists inside a secure Isolated Web App with the sub-apps permission policy — currently ChromeOS-only for end users, with the developer-trial flags (#enable-isolated-web-apps, #enable-isolated-web-app-dev-mode, #enable-sub-apps) and an install via chrome://web-app-internals. ChromeStatus (API, updated 2026-07-24) targets default-on at Chrome 152 (status text “Proposed”). Outside that context this page reports the unsupported branch and the payload it would have sent — it never pretends an install happened.
Build and send an install batch
| Install path | ManifestId |
|---|
| Install path | DOMException |
|---|
Illustrative response shape (reference only — not a live result)
When the real API runs inside an IWA, a partially-successful add() resolves to something like this:
{
"installedApps": {
"/mail/index.html": "/mail/",
"/calendar/index.html": "/calendar/"
},
"failedApps": {
"/mail/index.html": DOMException { name: "InvalidStateError" }
}
}
per-app failure taxonomy
Each entry in failedApps is a DOMException whose name tells you why that specific path failed:
- ConstraintError
- The sub app's scope is a prefix of (or contained by) another app's scope, or points at the parent app's own manifest.
- DataError
- The referenced web manifest was invalid or could not be parsed.
- InvalidStateError
- A sub app is already installed at that path.
- OperationError
- A generic system or database failure during that install.
Batch-level rejections reject the whole promise instead: TypeError (invalid paths), SecurityError (missing sub-apps policy), NotSupportedError (called from inside another sub app), NotAllowedError (user declined the prompt), or QuotaExceededError (per-parent limit reached).
see also
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗