Skip to main content

shareCallbacks()

Returns dictionary representing the current callbacks currently stored within Command AI. The keys represent callback keys, and the values are the supplied functions.

Example

console.log(window.CommandBar.shareCallbacks());
// { sayHi: f }

const callback = window.CommandBar.shareCallbacks()["sayHi"];
const args = { name: "Jane" };
callback(args);
// "Hi there, Jane!"