#7638·rxjs

Polyfill refuses to initialize when AbortController is a subclass

Author: MaXalCreated Sep 16, 2026Updated Sep 16, 2026

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:

bash
npm install [email protected]
node repro.mjs

This reproduction does not require happy-dom.

javascript
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

typescript

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).