A "router" Web Component

Will listen for the Switch Page event and render the requested page if possible. Otherwise, switches to a Not Found page.

Hierarchy

  • HTMLElement
    • RootComponent

Constructors

  • Returns RootComponent

Properties

_currentPage: Canvas = DefaultPage

Current active page

_gameEventService: GameEventService = ...

Instance of the game event service

Methods

  • The "constructor" of a Web Component

    Returns void

  • Switch to a different page

    Parameters

    • page: Canvas

      Page to switch to

    Returns void

  • Render the contents of this page

    Returns void

  • Render the current active page

    Returns HTMLElement

    HTML element of the current active page