Widget Protocol

From PowerUI
Revision as of 09:50, 14 January 2017 by 151.229.186.156 (talk)
Jump to: navigation, search

The window:// protocol is used from an anchor (a href='..') element to cycle a window. If you click the link a second time, it will close the open window. It specifies what should be inside the window and the window template to use:

<a href='window://<template name>/<path to content>'>Cycle a window</a>


Floating - the Built in template for a typical window

A template called "floating" is included by default. It is essentially a classic draggable, resizable window with a title bar (which will be set from the document.title of your content).


The content path

Your content path is a complete URI which defaults to being relative to resources://. So, for example, let's say you'd like to open up a bank inside a default floating window. Your bank UI is described in Resources/UIs/Bank/index.html. That makes your window URL look like this:

<a href='window://floating/UIs/Bank/index.html'>Open or close the bank!</a>

Opening a window from code

The window protocol is one way of opening up a window. If you'd like to open up a window from code, see the window manager web API.