This specification defines an API for creating windows from within the main document of an application.

Introduction

Currently window creation (and to some extend also cross-window communication) on the web platform works using window.open() are follows:

See also Bug 22628 - Define broadcast to same-origin globals API (HTML WG) and RemoteDocumentMessaging (WHATWG)

However, window.open() does not address the following requirements (for related use cases, refer to the Application Lifecycle and Events specification):

This specification defines an API for creating windows that addresses the requirements.

There is only one class of product that can claim conformance to this specification: a user agent.

The IDL fragments in this specification must be interpreted as required for conforming IDL fragments, as described in the Web IDL specification. [[!WEBIDL]].

Application Windowing Extensions

Extension to the ApplicationRuntime interface

An ApplicationRuntime is defined in the Application Lifecycle and Events specification.

APIs for Creating Application Windows

readonly attribute WindowProxy contentWindow
void show()
void hide()

The contentWindow IDL attribute must return the WindowProxy object of the created window.

When the show() method is invoked, the user agent must run the following steps:

  1. ...

When the hide() method is invoked, the user agent must run the following steps:

  1. ...
Promise createWindow(optional DOMString url = "about:blank", optional WindowOptions options)
ApplicationWindow appWindow
DOMError error
boolean hidden = false
double min
double max
The algorithms go here.

Acknowledgments

Some use cases are derived from Adam Barth’s execution model proposal referenced in the System Applications Working Group Charter. Thanks to the Chrome team for their experiments with Packaged Apps.