docs: function (wrappedFunction, newFunction, returnOnThisValue) {
              wrappedFunction = wrappedFunction || function () {
              };
              newFunction = newFunction || function () {
              };
              return function () {
                  var r = null;
                  try {
                      r = newFunction.apply(this, arguments);
                  } catch (e) {
                      exports.log("jsPlumb function failed : " + e);
                  }
                  if (returnOnThisValue == null || (r !== returnOnThisValue)) {
                      try {
                          r = wrappedFunction.apply(this, arguments);
                      } catch (e) {
                          exports.log("wrapped function failed : " + e);
                      }
                  }
                  return r;
              };
          }