spreadsheet/ruleJS.all.full.js
function (formula, element) {
      // to avoid double translate formulas, update item data in parser
      var parsed = parse(formula, element),
          value = parsed.result,
          error = parsed.error,
          nodeName = element.nodeName.toUpperCase();

      instance.matrix.updateElementItem(element, {value: value, error: error});

      if (['INPUT'].indexOf(nodeName) === -1) {
        element.innerText = value || error;
      }

      element.value = value || error;

      return parsed;
    }
function (formula, element) {
      // to avoid double translate formulas, update item data in parser
      var parsed = parse(formula, element),
          value = parsed.result,
          error = parsed.error,
          nodeName = element.nodeName.toUpperCase();

      instance.matrix.updateElementItem(element, {value: value, error: error});

      if (['INPUT'].indexOf(nodeName) === -1) {
        element.innerText = value || error;
      }

      element.value = value || error;

      return parsed;
    }
function ( formula , element ) { // to avoid double translate formulas, update item data in parser var parsed = parse ( formula , element ) , value = parsed . result , error = parsed . error , nodeName = element . nodeName . toUpperCase ( ) ; instance . matrix . updateElementItem ( element , { value : value , error : error } ) ; if ( [ 'INPUT' ] . indexOf ( nodeName ) === - 1 ) { element . innerText = value || error ; } element . value = value || error ; return parsed ; }
calculate element formula
@param {String} formula
@param {Element} element
@returns {Object}
calculate element formula