Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

78
Vistas
AbortController polyfill

Tried to make a polyfill for the abortController, but I ran into this error: error image

Error: Failed to execute 'fetch' on 'Window': Failed to read the 'signal' property from 'RequestInit': Failed to convert value to 'AbortSignal'.
class AbortSignalPolyfill extends EventTarget {
  readonly aborted: boolean = false
  onabort() {}
  addEventListener() {}
  removeEventListener() {}
}

class AbortControllerPolyfill {
  readonly signal = new AbortSignalPolyfill()
  abort() {}
}

;(function () {
  if (
    typeof window.Request === 'function' &&
    Object.prototype.hasOwnProperty.call(window.Request, 'signal') &&
    window.AbortController
  ) {
    return
  }

  Object.defineProperty(window, 'AbortController', {
    writable: true,
    enumerable: false,
    configurable: true,
    value: AbortControllerPolyfill,
  })

  Object.defineProperty(window, 'AbortSignal', {
    writable: true,
    enumerable: false,
    configurable: true,
    value: AbortSignalPolyfill,
  })
})()

Can anyone tell me why? Maybe the problem is in the abortControllerPolyfill and abortSignalPolyfill.

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda