Skip to content

Instantly share code, notes, and snippets.

View KulkarniSameer's full-sized avatar

Sameer Kulkarni KulkarniSameer

View GitHub Profile
@KulkarniSameer
KulkarniSameer / app1.html
Created February 23, 2020 17:30
Sample gist to demonstrate cross-origin communication. It has 3 app: parent, app1, app2. Assumptions- Parent app is running on localhost:8080. App1 is loaded in Parent app via iframe and is running on localhost:8081. App2 is spawned from parent app, it runs in a separate tab/window and is running on localhost:8082.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>App 1</title>
</head>
<body>
<h1>App 1</h1>
<script>