Javascript – Promise redefinition does not affect promises returned by native functions
(See also this answer.) When I redefine the Promise class (with a "monkey-patch" as shown below), this does not affect promises that are returned by a native function like fetch: Promise = class extends Promise { constructor(executor) { console.log("Promise created");…