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

132
Views
Abra la página en la misma ventana cuando el usuario haga clic en la notificación

Quiero abrir el enlace de notificación en la misma página y ahora estoy usando return client.openWindow(navUrl); pero hay un problema que está abierto en una pestaña diferente. ¿Alguien puede guiarme o ayudarme a comprender la diferencia entre Window y windowClients porque no conozco el javascript y necesito completar la notificación automática?

Además, Windows no funciona en mi archivo firebase-messaging-sw.js

aqui adjunto mi codigo

 event.waitUntil( clients.matchAll({ type: 'window', includeUncontrolled: true }).then(windowClients => { // Check if there is already a window/tab open with the target URL for (let i = 0; i < windowClients.length; i++) { var client = windowClients[i]; // If so, just focus it. console.log('here'); if (client.url.startsWith(OriginalUrl) && 'focus' in client) { console.log('window found'); // client.claim().then(()=>{ // console.log('claimed'); // client.focus().then(function(windowClient) { // console.log('focusing'); // windowClient.focus(); // console.log('focused'); // // windowClient.navigate(navUrl); // }); // }); // break; return clients.openWindow(navUrl); } } // If not, then open the target URL in a new window/tab. // if (clients.openWindow) { // console.log('window not found opening new'); // event.waitUntil(clients.claim());// this // return clients.openWindow(navUrl); // } }) );
about 4 years ago · Juan Pablo Isaza
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!