Options
All
  • Public
  • Public/Protected
  • All
Menu

A view for showing subaio-content. Wraps a webview and handles communication with the embedded app, as well as interaction with the shared Manager.

No Views should be created before manager.configure has been invoked.

Hierarchy

  • BridgeView

Index

Constructors

constructor

  • Create a wrapped iframe inside a target element. The iframe will have width and height set to 100% and flex to 1 1 auto to fill the container.

    It is important to call view.cleanup() before removing the element from the DOM.

    Parameters

    Returns BridgeView

Properties

Readonly element

element: HTMLElement

The element container

eventHandlers

eventHandlers: EventHandlers

Update the event-handlers set by the constructor.

Readonly frame

frame: HTMLIFrameElement

The iframe element

status

status: Status

Current status of the view.

Observe with EventHandlers.onStatusChange

title

title: string

Current title of the view.

Observe with EventHandlers.onTitleChange.

Only useful for applications where a navigation bar is shown above the BridgeView.

Accessors

page

  • get page(): Page | null
  • set page(page: Page | null): any
  • Change the current page. Will cause the view to clear current state and load a new view.

    Primarily useful when changing the page of a single view, otherwise the page can be set through the constructor.

    Returns Page | null

  • Change the current page. Will cause the view to clear current state and load a new view.

    Primarily useful when changing the page of a single view, otherwise the page can be set through the constructor.

    Parameters

    Returns any

Methods

cleanup

  • cleanup(): void
  • Remove iframe from the dom and unbind all event-handling.

    It is important to always call this method before the BridgeView element is remove from the DOM.

    Returns void

refresh

  • refresh(): void
  • Force the view to reload data for its internal state. Note that this may cause some state such as forms and wizard-pages to reset.

    Returns void

sendCustomAction

  • sendCustomAction(name: string, data?: any): void
  • Send a custom event to the embedded app. name and the shape of data should be agreed upon beforehand between the host app and the embedded app.

    Parameters

    • name: string

      A unique name for the action

    • Optional data: any

      An optional payload of data to be sent along

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Accessor

Generated using TypeDoc