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

132
Vistas
Why doesn't structuredClone copy Function Object?

MDN says that "Function objects cannot be duplicated by the structured clone algorithm; attempting to throws a DataCloneError exception."

Why does copying a function object emit an error with structuredClone()?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you read on MDN/structuredClone, it says

Exceptions

DataCloneError DOMException

  • Thrown if any part of the input value is not serializable.

For why functions are not serializable, see here: Why is a function not serializable?

From what I understand of those answers, the TL;DR is that it's because a function can be converted to a string, but the variables/functions referenced in the function that are out of scope would cause issues.

about 4 years ago · Juan Pablo Isaza Denunciar
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