PromiseRejectionEvent does not conform to spec again
See original GitHub issue-
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.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:15 (4 by maintainers)
Any plans on doing a new release to fix this issue?
Looks like this is not due to build issues. The commit which adds the property defines was merged on Oct 6, 2017 and 3.5.1 was released on Oct 4, 2017
@petkaantonov or @benjamingr would you mind releasing a patch version to get this updated?