Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-4392

[JS Performances] remove all eval

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.2.0
    • None
    • None
    • None

      Replace all evals by something like

      function executeFunctionByName(functionName, context /*, args */) {
          var args = Array.prototype.slice.call(arguments, 2);
          var namespaces = functionName.split(".");
          var func = namespaces.pop();
          for (var i = 0; i < namespaces.length; i++) {
              context = context[namespaces[i]];
          }
          return context[func].apply(context, args);
      }
      

            Unassigned Unassigned
            raphael Raphaƫl Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: