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

125
Views
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
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!