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

305
Views
Notificación con requireInteraction: ¿cómo verificar si se muestra?

Muestro una notificación 'pegajosa' como esta:

 function show(text) { let alreadyOn = false; // ??? how to get this ??? if (!alreadyOn) { new Notification(text, { requireInteraction : true }); } } Notification.requestPermission(); show("first"); setTimeout(() => show("second"), 1000);

(Tenga en cuenta que esto es solo una muestra y debe permitir la notificación la primera vez que se ejecuta e intente nuevamente)

¿Hay alguna forma de que mi código determine más tarde si esta notificación aún está activa o si el usuario ya la descartó? Eso es cómo determinar alreadyOn anterior?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede agregar un controlador de eventos con el método Notification.onclose para hacer algo cuando el usuario cierra la Notification .

 Notification.onclose = function () { // do something... }
about 4 years ago · Juan Pablo Isaza Report
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!