Backup UI Actors Reference

The BackupUIParent and BackupUIChild actors allow UI widgets to access the current state of the BackupService and to subscribe to state updates.

UI widgets that want to subscribe to state updates must ensure that they are running in a process and on a page that the BackupUIParent/BackupUIChild actor pair are registered for, and then fire a BackupUI::InitWidget event.

It is expected that these UI widgets will respond to having their backupServiceState property set.

class BackupUIParent()

A JSWindowActor that is responsible for marshalling information between the BackupService singleton and any registered UI widgets that need to represent data from that service.

Create a BackupUIParent instance. If a BackupUIParent is instantiated before BrowserGlue has a chance to initialize the BackupService, this constructor will cause it to initialize first.

BackupUIParent.BackupUIParent

Create a BackupUIParent instance. If a BackupUIParent is instantiated before BrowserGlue has a chance to initialize the BackupService, this constructor will cause it to initialize first.

BackupUIParent.bs

type: BackupService

A reference to the BackupService singleton instance.

BackupUIParent.actorCreated()

Called once the BackupUIParent/BackupUIChild pair have been connected.

BackupUIParent.didDestroy()

Called once the BackupUIParent/BackupUIChild pair have been disconnected.

BackupUIParent.handleEvent(event)

Handles events fired by the BackupService.

Arguments:
  • event (Event) – The event that the BackupService emitted.

BackupUIParent.receiveMessage(message)

Handles messages sent by BackupUIChild.

Arguments:
  • message (ReceiveMessageArgument) – The message received from the BackupUIChild.

BackupUIParent.sendState()

Sends the StateUpdate message to the BackupUIChild, along with the most recent state object from BackupService.

class BackupUIChild()

A JSWindowActor that is responsible for marshalling information between the BackupService singleton and any registered UI widgets that need to represent data from that service. Any UI widgets that want to receive state updates from BackupService should emit a BackupUI:InitWidget event in a document that this actor pair is registered for.