Sha256: 600e7ed97b81521ddd4cecb12f65e6174b9bd3fb22eec04d8c3205676685bfb2
Contents?: true
Size: 561 Bytes
Versions: 34
Compression:
Stored size: 561 Bytes
Contents
'use strict'; var core = require('./core'); function unwrapEvent(event) { if (event && event.detail && event.detail.promise) { return event.detail; } return event; } module.exports = function (w) { w = w || window; var c = core(); w.addEventListener('unhandledrejection', function (event) { event = unwrapEvent(event); c.onUnhandledRejection(event.reason, event.promise); }); w.addEventListener('rejectionhandled', function (event) { event = unwrapEvent(event); c.onRejectionHandled(event.promise); }); return c.currentlyUnhandled; };
Version data entries
34 entries across 33 versions & 14 rubygems