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

131
Vistas
This Keyword inside Callback Function

I have a newbie question.

For some reason my code can't access the value stored in the keyword: this.Selector (last line of code). I think it must have something to do that it's a callback function but I don't what and how to change it.

 class Test {
    constructor(url, range, Selector){
      this.url = url;
      this.range = range;
      this.Selector = Selector
    }

async puppi(){
    const browser =  await puppeteer.launch({headless: true});
    const page =  await browser.newPage();
    await page.goto(this.url);

    const Voucher =  await page.evaluate(()=>{
    let GrapCoupons = document.querySelectorAll(this.Selector);

If you know why, then it would mean a lot to me since I am totally stucked.

Thanks in advance!!

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