Use Doran Javascript API

Use Doran Javascript API

The Doran Javascript API exposes the following methods. By using them, you can use them to control Doran programmatically.

Note: All of following methods must be called on the method.

window.$doran.onReady = function() {
  // Do your code here
}

Open a widget

Call this method to open a widget.

window.$doran.dispatch({
  type: 'OPEN_WIDGET',
  payload: {
    widgetId: '<Insert your widget ID>'
  }
})

Close a widget

Call this method to close a widget.

window.$doran.dispatch({
  type: 'CLOSE_WIDGET',
  payload: {
    widgetId: '<Insert your widget ID>'
  }
})
Linda Bui
Linda Bui
Updated a week ago 1 min read

Table of contents