forked from johnman/openfin-multi-window-communication
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
73 lines (73 loc) · 2.36 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Multi Window Communication</title>
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<script src="components/openfin-link.js"></script>
<script type="module" src="js/index.js"></script>
<link rel="stylesheet" href="style/main.css" />
<style>
body {
background-color: white;
color: black;
}
</style>
</head>
<body>
<h1>Multi Window Communication</h1>
<p>
You are running OpenFin Runtime version:
<span id="openfin-version"></span>
</p>
<p>
This example shows four different ways of pushing out messages from a
single source to multiple windows.
</p>
<ul>
<li>Broadcast Channel using a Shared WebWorker</li>
<li>Broadcast Channel from the Publisher Page</li>
<li>
OpenFin IAB Message Bus from the Publisher Page (only within OpenFin)
</li>
<li>
OpenFin Channel API from the Publisher Page (only within OpenFin)
</li>
</ul>
<p>
You may want to have one window/worker acting as the connection to a
websocket and then have that push out data across multiple windows.
</p>
<p>
This hasn't been built as an example of best practice. The goal is to give
you a way of defining what type of message you want to share, how you want
to share that message and if there is a threshold in milliseconds you do
not want a message to exceed.
</p>
<p>
You can run this example in the browser (enable popups):
</p>
<p>
<a href="./views/publisher.html" target="_blank">Launch in the Browser</a>
</p>
<p>
Or you can run this example in OpenFin:
</p>
<p>
<openfin-link
show-in-fin="true"
href="fin://localhost:3000/config/app.platform.fin.json"
>Launch Local OpenFin Platform Application</openfin-link
>
</p>
<p>
<openfin-link
show-in-fin="true"
href="fin://openfin.github.io/openfin-multi-window-communication/config/gh.app.platform.fin.json"
>Launch Github.io OpenFin Platform Application</openfin-link
>
</p>
</body>
</html>