Share your repls and programming experiences

← Back to all posts
Cross-tab communication
Proxy303 (7)

This is a simple program used to demonstrate how to get one tab to communicate with another. Click the button on either tab to make an alert on the other.

Commentshotnewtop
AdCharity (1307)

Wouldve seen it but my browser blocked it

Proxy303 (7)

@AdCharity try allowing pop ups from this page. Each page has a button, and clicking the button on one page creates an alert on the other.

Proxy303 (7)

I already that you can open a page as a variable, like this:
var x = window.open()
And edit it like this:
x.document.write()

But I found out that you can do things like:
x.document.getElementById().addEventListener()
and
x.window.alert()