Describe the bug
Replacing globalThis.AbortController with a subclass of the native constructor makes importing rxjs throw, even though AbortController.prototype.abort is inherited and callable.
Expected behavior
Save the following as repro.mjs in an empty directory, then run:
npm install rxjs@9.0.0-beta.0
node repro.mjs
This reproduction does not require happy-dom.
const Native = globalThis.AbortController
class WindowAbortController extends Native {}
globalThis.AbortController = WindowAbortController
console.log(Object.getOwnPropertyDescriptor(WindowAbortController.prototype, "abort")) // undefined
console.log(typeof WindowAbortController.prototype.abort) // "function"
await import("rxjs")
Output (stack trace omitted):
undefined
function
TypeError: Cannot initialize @rxjs/observable-polyfill: AbortController.prototype.abort is unavailable
Expected: importing rxjs succeeds when AbortController.prototype.abort is inherited and callable.
Reproduction code
Reproduction URL
No response
Version
@rxjs/observable-polyfill 9.0.0-beta.0 via rxjs 9.0.0-beta.0
Environment
Node 26.8.2
Additional context
Also observed under vitest 5 with environment: "happy-dom" (happy-dom 20.14.5).
Describe the bug
Replacing
globalThis.AbortControllerwith a subclass of the native constructor makes importingrxjsthrow, even thoughAbortController.prototype.abortis inherited and callable.Expected behavior
Save the following as
repro.mjsin an empty directory, then run:This reproduction does not require happy-dom.
Output (stack trace omitted):
Expected: importing
rxjssucceeds whenAbortController.prototype.abortis inherited and callable.Reproduction code
Reproduction URL
No response
Version
@rxjs/observable-polyfill 9.0.0-beta.0 via rxjs 9.0.0-beta.0
Environment
Node 26.8.2
Additional context
Also observed under vitest 5 with
environment: "happy-dom"(happy-dom 20.14.5).