v152 · chromeos · isolated web apps

Window shape API

Allowlisted ChromeOS Isolated Web Apps can call window.chromeos.isolatedWebApp.setShape() to make unframed app windows non-rectangular or non-contiguous using a list of rectangles.

concepts

  1. Rectangle composer

    Build a multi-rectangle shape and call the proposed setShape(rectangles) method when it is exposed.

  2. Clear custom shape

    Exercise the reset path: setShape([]) restores the default rectangular window.

  3. Minimum-size guard

    Validate the explainer's 10×10 safety constraint before attempting to apply tiny or invisible shapes.

why it shipped

Some ChromeOS IWAs need native-like widgets, floating panels, or overlays that do not map to one rectangular app surface. The API keeps that power limited to allowlisted IWAs in unframed display mode with window-management permission.

references