v147 · proposed IWA API · member reference
Window.printing
The normative WICG entry point is the same WebPrintingManager object associated with a Window. navigator.printing is not declared. Chromium’s WindowOrWorkerGlobalScope binding is an implementation/spec divergence, not a normative worker contract.
Syntax
const manager = window.printing; // WebPrintingManagerInputs
No arguments. Access the member from a Window; use feature detection before calling it.
Outputs
Returns the same manager object for a Window ([SameObject]), according to the normative IDL. It does not enumerate printers itself.
Errors
Access is not documented as a throwing operation; the method performs the policy and isolation checks. Do not infer that member presence proves the call will succeed.
Context and permission
The IDL requires a secure, isolated context. The specification also defines the web-printing Permissions Policy with default allowlist self; Chromium additionally checks an isolated context and cross-origin isolation before getPrinters(). The current proposal requires express, origin-specific consent triggered by enumeration. The exact chooser scope, persistence, and whether a later operation prompts again remain user-agent UX, not a settled web contract.
Lifecycle, cancellation, and cleanup
The normative manager is allocated per Window. Chromium’s binding currently names WindowOrWorkerGlobalScope, but that is an implementation/spec divergence: worker usability is unknown and must not be treated as normative or promised without target-runtime evidence.
Examples
const manager = window.printing;
if (!manager || typeof manager.getPrinters !== "function") {
throw new Error("Web Printing API is unavailable in this window");
}
const printers = await manager.getPrinters();Browser compatibility
| Runtime | Status | Evidence |
|---|---|---|
| Chrome (general) | Proposed and not released. ChromeStatus lists I2S desktop target 147, which is not release proof. Do not infer general desktop Chrome support. | ChromeStatus |
| Current Chromium service | Implemented only when built with IS_CHROMEOS && USE_CUPS; otherwise getPrinters() has no service and throws SecurityError. | Chromium manager implementation |
| Android / mobile | ChromeStatus Android is null; no public mobile release exists. The current ChromeOS+CUPS-only service path does not expose the service on Android. | ChromeStatus; implementation guard |
| Firefox | No signal; no BCD member record found. | ChromeStatus position; BCD API data |
| Safari | No signal; no BCD member record found. | ChromeStatus position; BCD API data |
| webstatus.dev | No feature entry found for this query; this is not proof of absence from browsers. | webstatus query |
Security and privacy
Printer names, IDs, capabilities and state can fingerprint a device and reveal printing activity. A compromised IWA could create unwanted jobs or denial of service. Minimize enumeration and polling, do not expose attributes to untrusted content, validate documents before submitting, and offer an app-level confirmation/audit trail. The spec requires isolation and consent; it does not make printer information non-sensitive.