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

206
Views
BroadcastChannel API JS no funciona. ¿Cómo utilizar?

Estoy tratando de usar la API BroadcastChannel en JS. Tengo el siguiente código en mi sitio web. Quiero un campo de entrada de tal manera que su valor se actualice automáticamente si la entrada se proporciona en otra pestaña de la misma página web y viceversa.

 <input id="d" class="a0000000000a"> <script> 'use strict'; try { const a = new BroadcastChannel('a'); a.onmessage = b => { var c = JSON.parse(b.data); document.getElementsByClassName('a' + ca + 'a')[0].value = cb }; const d = document.getElementById('d'); d.oninput = () => a.postMessage({ a: d.className, b: d.value }); } catch (e) { alert(e) } </script>

No está produciendo ningún error. Y tampoco funciona como esperaba.

EDITAR
Problema resuelto.

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!