Dashboard.getMode

Syntax

getMode();

Description

The getMode method determines whether dashboard is opened for edit or for view.

Comments

Available values:

Dashboard opening is set in the KapBox constructor using the Mode parameter.

Example

To execute the example, make sure that the repository contains a dashboard with the 88665 key.

Create an HTML page with example of placing the KapBox component and execute the following operations:

  1. Open the dashboard with the 88665 key:

kapBox.open({
    Key: 88665
});
  1. Execute the following in the console:

if (kapBox.getMode() == "edit") {
    console.log("Edit");
}
else console.log("View");

After executing the example the console displays message with the current work mode.

See also:

Dashboard