# window.chrome.app undefined? Check which world you are in

> window.chrome.app exists in a page's main world and is undefined in an isolated world, in every Chrome we tried. A content script reads the second one.

Source: https://mosaicbrowser.com/blog/window-chrome-app-undefined

## window.chrome.app is missing, but only in the world you asked

window.chrome.app exists in a page's main world and is undefined in an isolated world, in every Chrome we tried. A content script reads the second one.

![7 vs 0: Seven members in the main world, none in the isolated one](https://mosaicbrowser.com/covers/window-chrome-app-undefined.webp)

If `window.chrome.app` reads `undefined`, the first thing to check is which JavaScript world your code runs in. Chrome installs `chrome.app` in a page's main world and leaves it out of isolated worlds, which is where extension content scripts and many automation probes live. We once nearly reported it missing from our own engine for exactly this reason.

## What we measured

We opened Google Chrome 156 on a Mac in November 2026, with a fresh user-data directory, and read the same expression twice on each page: once in the main world, once in an isolated world made with the DevTools command `Page.createIsolatedWorld`. Three pages: `https://example.com/`, `about:blank` and a `data:` URL.

The answer did not depend on the page. In the main world, `window.chrome` had three keys, `loadTimes`, `csi` and `app`, and `chrome.app` had seven members:

```
isInstalled  getDetails  getIsInstalled  installState
runningState  InstallState  RunningState

```

`chrome.app.isInstalled` was `false`, as it is on any ordinary web page. In the isolated world, on the same tab and the same document, `window.chrome` existed with `loadTimes` and `csi`, and `typeof window.chrome.app` was `"undefined"`. The User-Agent was identical in both readings, because it is the same browser.

That half-present object is what makes this confusing. A missing `window.chrome` would make you suspect the probe at once. A `window.chrome` with two of its three keys looks like a browser with something wrong inside it.

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: Machines that exist](https://mosaicbrowser.com/features/real-fingerprints)

## Why window.chrome.app is undefined in an isolated world

Chrome's extension documentation puts it in one line: "Content scripts live in an isolated world", a private execution environment the page cannot see into. The page, each extension and each DevTools-created world share the DOM, but each has its own JavaScript globals. Bindings such as `chrome.app` are installed per world, and the page's main world gets this one where an isolated world does not.

So a content script that checks `window.chrome.app` sees `undefined` on every site, in every copy of Chrome. If you need the page's value, run the check in the main world. With `chrome.scripting.executeScript` or a `content_scripts` entry that means setting `world` to `MAIN`; the documentation lists `ISOLATED` as the default.

## How the wrong world almost became a finding

We were chasing a real signal at the time. IPHey rated our engine "Unreliable" with MX 90 and the note `inconsistent browser fingerprint (whale)`, and the machine's branded Chrome got "Trustworthy" with MX 100 on the same machine, minutes apart. We were comparing everything a page can read between the two: `window.chrome` two levels deep, CSS properties, plugins, codecs, voices, WebGL, fonts, request headers.

One diff came back with `window.chrome.app` absent on our side. It would have been a satisfying answer, a missing object any script can test for. It was wrong. The probe had read our engine in an isolated world and stock Chrome in the main world. Read in the same world, `chrome.app` was present in the main world of all three browsers we had open (our engine, Google Chrome and Chrome for Testing) and absent in the isolated world of all three, byte for byte.

Our probes run in an isolated world on purpose. Mosaic drives pages without the DevTools `Runtime` domain, because switching it on [flipped a detector to isBot=true](https://mosaicbrowser.com/blog/runtime-enable-detection) in our tests, and an isolated world is how we read a page without it. The cost is that some of what we read is a world's view, not the page's view, and that has to be remembered every time two readings are compared.

It was the second time our notes recorded this shape. The first was an API marked `[SecureContext]` that we read on a page that was not a secure context, and reported as missing from one browser ([the about:blank story](https://mosaicbrowser.com/blog/securecontext-api-undefined)). Both times we had two browsers, two contexts and one confident conclusion about the wrong variable.

## A probe that cannot make this mistake

These are the rules we now hold every comparison to:

1. Read both browsers in the same world, on the same URL. If one side has to be isolated, both are.
2. Print the world next to every value. A diff row that says `chrome.app: missing (isolated) vs present (main)` explains itself.
3. Carry a control member. `chrome.loadTimes` is present in both worlds, so if it vanishes too, the probe is broken, not the browser.
4. Compare against a browser people actually run. Chrome for Testing contradicts its own User-Agent in its brand list, which is why [Google's unbranded build](https://mosaicbrowser.com/blog/the-control-is-googles-build) settles some questions and not others.

The isolated-world comparison also explains what `window.chrome.app` cannot do as a headless test. It tells you which world a script runs in before it tells you anything about the browser, so a [headless check](https://mosaicbrowser.com/guides/detect-headless-chrome) that relies on it from a content script will flag every visitor.

## Sources

1. [Chrome for Developers: Content scripts, Work in isolated worlds](https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts), read November 3, 2026
2. [Chrome DevTools Protocol: Page.createIsolatedWorld](https://chromedevtools.github.io/devtools-protocol/tot/Page/), read November 3, 2026

## Questions

### Why is window.chrome.app undefined in my content script?

Content scripts run in an isolated world, and Chrome installs chrome.app only in the page's main world. Read it from a script injected with world set to MAIN, or from the page itself, and it is there.

### Is window.chrome.app undefined in headless Chrome?

We did not measure headless for this piece. In a headed Google Chrome 156 it was present in the main world on https, about:blank and data: pages alike. Before blaming headless, check which world your probe runs in.

### What is in window.chrome.app?

In the main world of Google Chrome 156 on a Mac: isInstalled, getDetails, getIsInstalled, installState, runningState, InstallState and RunningState. isInstalled read false on an ordinary web page.

### Does window.chrome itself exist in an isolated world?

Yes. In our measurement the isolated world had window.chrome with loadTimes and csi. Only app was missing, which makes a half-present object that is easy to misread as a broken browser.

## Related

[An API missing on about:blank is not missing](https://mosaicbrowser.com/blog/securecontext-api-undefined): An API marked SecureContext reads as undefined on an insecure page. We twice mistook that for a browser difference, on about:blank and on a data: URL.

[Runtime.enable flips a detector, so we don't call it](https://mosaicbrowser.com/blog/runtime-enable-detection): Runtime.enable detection, measured: one DevTools command turned a clean Mosaic profile into isBot=true on deviceandbrowserinfo. We removed all five calls.

[The control that settles "is it our changes?"](https://mosaicbrowser.com/blog/the-control-is-googles-build): An unchanged Chrome for Testing got the same IPHey verdict as our engine, so our changes were not the cause. Its voice list still differs from Chrome's.

[How to detect headless Chrome: the signals that hold up](https://mosaicbrowser.com/guides/detect-headless-chrome): How to detect headless Chrome: it names itself in its User-Agent, drops the real GPU and is usually driven over DevTools. The checks that hold up.

[Chrome DevTools Protocol: how tools drive Chromium](https://mosaicbrowser.com/glossary/chrome-devtools-protocol): The Chrome DevTools Protocol is the JSON-over-WebSocket interface DevTools, Puppeteer and Playwright use to inspect and drive Chrome and Chromium browsers.



[Why navigator.webdriver is true, and why false proves little](https://mosaicbrowser.com/blog/why-navigator-webdriver-true): navigator.webdriver is the W3C WebDriver flag, true under Selenium, Playwright, Puppeteer or headless Chrome. A Chrome reading true scored 100 on IPHey.

[Chrome removed the software WebGL fallback](https://mosaicbrowser.com/blog/swiftshader-webgl-fallback): Without a usable GPU, Chrome no longer falls back to SwiftShader, so WebGL fails. On a GPU-less server the missing context is itself a value a page reads.

## Mosaic, on your own computer

The browser this blog is about: its own Chromium, fingerprints from real machines and a proxy IP per profile. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
