Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
cómo usar el controlador de eventos onClick en el método insertAdjacentHTML

Estoy tratando de agregar un controlador onClick en el método insertAdjacentHTML pero SyntaxError: Function statements require a function name , configuré un registro de consola, debería mostrar el valor de la consola pero arroja el error,

¿Me estoy perdiendo algo?

 document .querySelector(`[data-msgid="${view.id}"] .chat-msg__message`) ?.insertAdjacentHTML( 'beforeend', `<div class="daisy-dropdown daisy-dropdown-end"> <button tabindex="0" type="button"> <i class="fa fa-bars ml-2"></i> </button> <div tabindex="0" class='${[ 'daisy-dropdown-content', 'daisy-menu', ].join(' ')}'> <button onclick=${() => console.log('click')}>Kick</button> </div> </div>` );
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!