nl_tokens: callbackOptions param represents additional optional parameters command could pass back like keepCallback or custom callbackId for example { callbackId : id keepCallback : true status : cordova . callbackStatus . JSON_EXCEPTION }
pl_tokens: function ( result , callbackOptions ) { callbackOptions = callbackOptions || { } ; var callbackStatus ; // covering both undefined and null. // strict null comparison was causing callbackStatus to be undefined // and then no callback was called because of the check in cordova.callbackFromNative // see CB-8996 Mobilespec app hang on windows if ( callbackOptions . status !== undefined && callbackOptions . <mask> !== null ) { callbackStatus = callbackOptions . status ; } else { callbackStatus = cordova . callbackStatus . OK ; } cordova . callbackSuccess ( callbackOptions . callbackId || callbackId , { status : callbackStatus , message : result , keepCallback : callbackOptions . keepCallback || false } ) ; }