...
Run command whitelisted in Default Files\OEM Commands\commands.xml:
window.getXeDocument().RunCheckedCmd(commandString);
Where the commandString is your command you’d like to run including parameters you want to pass.
...
RunCheckedCmd returns a promise. If you are interested in the result, call it like
window.getXeDocument().RunCheckedCmd(commandString).then(function (result) {});