DataAPI SDK english MT.DataAPI Static method on - movabletype/mt-data-api-sdk-js GitHub Wiki
on
Register global level callback. The callback registered with this method is called by all the instances of DataAPI.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| key | String | yes | Event name |
| callback | Function | yes | Callback function |
Example
var callback = function() {
// Do stuff
};
DataAPI.on(eventName, callback);