Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70

exports

Object used to provide functions, variables, and properties for use by another script. Use require in another script to obtain the exports in the current script.

...

Require Extended Library: 

Code Block
exports.test = "test";

Examples

js example file with exports

Code Block
var example2 = {};
example2.init = function () {
    this.status = 'Status set by example2.init()';
};
example2.getStatus = function () {
    return this.status;
};
example2.setStatus = function (param) {
    this.status = param;
};
  
example2.init();
exports.getStatus = example2.getStatus.bind(example2);
exports.setStatus = example2.setStatus.bind(example2);