# allowInteropCaptureThis function

Function allowInteropCaptureThis (Function f)

## Implementation

    Function allowInteropCaptureThis(Function f) {
      if (JS('bool', 'typeof(#) == "function"', f)) {
        // Behavior when the function is already a JS function is unspecified.
        throw new ArgumentError(
            "Function is already a JS function so cannot capture this.");
        return f;
      } else {
        return _convertDartFunctionFastCaptureThis(f);
      }
    }