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

189
Vistas
javascript Proxy of function apply trap gives no access to the receiver Proxy

When I have a Proxy the get and set traps both provide access to the underlying target Object as well as the Proxy receiver of the initial access request. This is good, because for some "pseudo properties" of the Proxy that I need, I look up the Proxy on a WeakMap to find an extension object which has such properties that apply to the Proxy but not to the underlying target object.

When the underlying target Object is a Function, then the apply trap will work, but its arguments are only the naked function, and the thisArg and the arguments, not the Proxy receiver of the initial apply. So now my ability to look up extension properties to the Proxy fail.

Is there any other way that I can get back to the Proxy from within the apply trap? Shouldn't that be considered a bug in the Proxy specification? Or at least an inconsistency? If the Proxy is considered useful in get and set traps, why is it not considered useful in the apply trap?

about 4 years ago · Santiago Gelvez
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