Okay I know the reason, it should be a js_lint flake. How about change code as
```
if ((typeof onsuccess !== 'function') ||
    (onerror && typeof onerror !== 'function'))
```