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

122
Vistas
Send data from one tab to another cross domain

Need to find the solution for the below scenario.

On click on a button, a new window of different domain will open in a new tab. I want to send some data from the initial window to this new window.

Solution Tried: Sending data using window.postMessage from initial tab and trying to listen to that message event on a new window. Somehow not able to listen to that event.

--- On click of a button
 const windowObjectReference = window.open('http://localhost:7000/elmo/experiment');
  windowObjectReference.postMessage('message data');

--- On listener side
 window.addEventListener('message', (e) {
   console.log('*********************** data', e.data);
 }, false);

Expectation:

  1. What's the problem with the above-tried approach.
  2. If it's not possible by the above approach, how to do this?
about 4 years ago · Juan Pablo Isaza
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