Skip to main content Link Search Menu Expand Document (external link)

The Page Registry

Custom Jancy pages (ie. pages served up via the jancy:// protocol) are managed through the page registry interface.

There is only one page registry and it can always be found at jancy.pageRegistry.

Methods

pageRegistry.add(name, path)

  • name (string)
  • path (string)

Registers the absolute path on disk that contains all the HTML, CSS, and Javascript that makes up a webpage that will be displayed in Jancy when the user visits jancy://<name>.

Returns a unique identitifer for the page.

Path must contain an index.html as an entry point for your the page.

pageRegistry.remove(id)

  • id (string)

Removes a page previously registered with pageRegistry.add().

pageRegistry.showPage(pageToShow)

  • pageToShow (string)

Show a page previously registered in a new tab in the window that currently has focus.

pageToShow should be the same value as name was in the call to add (e.g. about, console, etc)