getState

Used to get the state of the hosting entity (a page where an app is embedded or the widget containing an iframe)

Syntax

import messageHandler from '@vcita/intandem-app-com';	

// ...initialize the handler

messageHandler.getState().then(function(state){//do something});
  
  // or
  
let status = await messageHandler.getState();

The State object

  1. hostName (String): The current host name
  2. hostType (String): The type of the host - page | widget
  3. view (String): Is the page in a "team" mode or in a "my view" mode - team | my_view
{
  "hostName": "home",
  "hostType: "widget"
  "view": "team"
}