getState
Used to get the state of the hosting entity (a page where an app is embedded or the widget containing an iframe)
Syntax
messageHandler.getState().then(function(state){//do something});
// or
let status=await messageHandler.getState();
The State object
hostName
(String): The current host namehostType
(String): The type of the host - page | widgetstate
(String): The logical state of the host - ready | loading | loadedstaff
: The staff objectaccountUid
(String): The unique identifier of the accountview
(String): Is the page in a "team" mode or in a "my view" mode - team | my_view
{
"hostName": "home",
"hostType: "widget"
"staff": <staff>,
"accountUid": "abc123"
"state": "Ready"
"view": "team"
}
Updated about 1 month ago