-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
-
What version of bluebird is the issue happening on?
3.5.1
-
What platform and version? (For example Node.js 0.12 or Google Chrome 32)
Testing in Chrome 67, but it's irrelevant -
Did this issue happen with earlier version of bluebird?
Do not know
Event objects fired with unhandledrejection
and rejectionhandled
do not conform to PromiseRejectionEvent
specification: They do not have reason
and promise
properties, instead they have detail
property which contains the two.
This issue was already raised as #1447 and fixed in #1464
And evidently the code is still there in master.
But it's gone in the build.
Here's the snipped from bluebird.core.js
as compiled by default and as linked on the site (https://cdn.jsdelivr.net/bluebird/latest/bluebird.core.js):
var fireDomEvent = (function() {
try {
if (typeof CustomEvent === "function") {
var event = new CustomEvent("CustomEvent");
util.global.dispatchEvent(event);
return function(name, event) {
var domEvent = new CustomEvent(name.toLowerCase(), {
detail: event,
cancelable: true
});
return !util.global.dispatchEvent(domEvent);
};
} else if (typeof Event === "function") {
// ...
For some reasons, property defines are gone.
I imagine this is either issue with build scripts or es5.defineProperty
shim.