Is there a reason why you need an anonymous fn here rather than `trans.onerror = trans.onabort = callback`?