WebAPI/WebSTK: Difference between revisions

Line 691: Line 691:
mozIcc.onstkcommand = function (command) {
mozIcc.onstkcommand = function (command) {
   switch (command.typeOfCommand) {
   switch (command.typeOfCommand) {
     case MozStkProactiveCommand.SET_UP_MENU:
     case mozIcc.proac.SET_UP_MENU:
       var menu = command.menu;
       var menu = command.menu;
       // create a Menu-like UI according to 'menu'
       // create a Menu-like UI according to 'menu'
Line 710: Line 710:
// 'command' is got from onstkcommand
// 'command' is got from onstkcommand
// and assume it's a Select Item command.
// and assume it's a Select Item command.
var response = new MozStkResponse(command);
var response = new mozIcc.MozStkResponse(command);
response.resultCode = MozStkResultCode.RESULT_OK;
response.resultCode = MozStkResultCode.RESULT_OK;
// 'id' is got from the chosen item identifier (menu.item[].identifier)
// 'id' is got from the chosen item identifier (menu.item[].identifier)
Confirmed users
266

edits