function processEventArgs(arg1, arg2, arg3, arg4) {
    if (isFunction(arg2)) {
      return {
        target: getDocument().body,
        event: asString(arg1),
        listener: arg2,
        options: arg3
      }
    } else {
      return {
        target: resolveTarget(arg1),
        event: asString(arg2),
        listener: arg3,
        options: arg4
      }
    }
  }
@param {EventTarget|AnyEventName} arg1
@param {AnyEventName|EventListener} arg2
@param {EventListener|Object|boolean} [arg3]
@param {Object|boolean} [arg4]
@returns {EventArgs}