iframe-coordinator-cli 6.5.0 → 6.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/assets/{index-DkVijnku.js → index-DejhDHus.js} +3 -3
  2. package/dist/ifc-docs/assets/hierarchy.js +1 -1
  3. package/dist/ifc-docs/assets/highlight.css +130 -91
  4. package/dist/ifc-docs/assets/icons.js +20 -17
  5. package/dist/ifc-docs/assets/icons.svg +1 -1
  6. package/dist/ifc-docs/assets/main.js +2535 -5
  7. package/dist/ifc-docs/assets/navigation.js +2 -1
  8. package/dist/ifc-docs/assets/search.js +2 -1
  9. package/dist/ifc-docs/assets/style.css +1571 -1581
  10. package/dist/ifc-docs/classes/client.Client.html +2388 -98
  11. package/dist/ifc-docs/classes/client.WorkerClient.html +2161 -92
  12. package/dist/ifc-docs/classes/host.FrameRouterElement.html +850 -24
  13. package/dist/ifc-docs/classes/host.WorkerPool.html +879 -29
  14. package/dist/ifc-docs/documents/client-setup.html +579 -75
  15. package/dist/ifc-docs/functions/host.registerCustomElements.html +218 -3
  16. package/dist/ifc-docs/hierarchy.html +168 -1
  17. package/dist/ifc-docs/index.html +432 -31
  18. package/dist/ifc-docs/interfaces/client.ClientConfigOptions.html +331 -4
  19. package/dist/ifc-docs/interfaces/client.EventEmitter.html +752 -14
  20. package/dist/ifc-docs/interfaces/host.ClientConfig.html +399 -7
  21. package/dist/ifc-docs/interfaces/host.ClientRegistration.html +580 -24
  22. package/dist/ifc-docs/interfaces/host.RoutingMap.html +211 -4
  23. package/dist/ifc-docs/interfaces/host.WorkerAppData.html +388 -6
  24. package/dist/ifc-docs/interfaces/host.WorkerConfig.html +398 -7
  25. package/dist/ifc-docs/interfaces/host.WorkerItem.html +401 -6
  26. package/dist/ifc-docs/interfaces/host.WorkerRegistry.html +210 -2
  27. package/dist/ifc-docs/interfaces/messages.Breadcrumb.html +373 -6
  28. package/dist/ifc-docs/interfaces/messages.EnvData.html +510 -11
  29. package/dist/ifc-docs/interfaces/messages.KeyData.html +540 -12
  30. package/dist/ifc-docs/interfaces/messages.ModalRequest.html +381 -6
  31. package/dist/ifc-docs/interfaces/messages.NavRequest.html +390 -9
  32. package/dist/ifc-docs/interfaces/messages.Notification.html +435 -9
  33. package/dist/ifc-docs/interfaces/messages.PageMetadata.html +438 -8
  34. package/dist/ifc-docs/interfaces/messages.PromptOnLeave.html +390 -9
  35. package/dist/ifc-docs/interfaces/messages.Publication.html +443 -11
  36. package/dist/ifc-docs/modules/client.html +742 -2
  37. package/dist/ifc-docs/modules/host.html +647 -1
  38. package/dist/ifc-docs/modules/messages.html +462 -1
  39. package/dist/ifc-docs/modules.html +359 -1
  40. package/dist/ifc-docs/types/client.EnvDataHandler.html +239 -1
  41. package/dist/ifc-docs/types/client.EventHandler.html +247 -2
  42. package/dist/index.html +1 -1
  43. package/package.json +3 -3
@@ -1,94 +1,598 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>client-setup | iframe-coordinator - v6.5.0</title><meta name="description" content="Documentation for iframe-coordinator"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">iframe-coordinator - v6.5.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">client-setup</a></li></ul></div><div class="tsd-panel tsd-typography"><h1 id="client-application-setup" class="tsd-anchor-link">Client Application Setup<a href="#client-application-setup" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><p>To seamlessly integrate a client application with a host, you will need to alter the client
2
- application's default behavior in a few ways. Detailed instructions are below. <em>Navigation is
3
- the trickiest item to get correct. Be sure to read that section carefully.</em></p>
4
- <h2 id="application-bootstrap" class="tsd-anchor-link">Application Bootstrap<a href="#application-bootstrap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Early in the application bootstrap process, you will need to create a <a href="../classes/client.Client.html" class="tsd-kind-class"> client.Client</a> instance, add an event
5
- listener for environment data passed from the host application, and start the client.</p>
6
- <p><a href="../interfaces/messages.EnvData.html" class="tsd-kind-interface">Environment data</a> is data set in the host application that is static over time, but that clients will
7
- need to function, such as the user-selected locale. It supports both pre-defined common/required
8
- options and custom data.</p>
9
- <p>Calling <a href="../classes/client.Client.html#start" class="tsd-kind-method"> client.Client.start</a> on the client sets up messaging
10
- listeners, and sends a signal to the host application to inform it that your application is
11
- ready to start receiving messages.</p>
12
- <p>The iframe-coordinator phase of a typical client bootstrap might look like this:</p>
13
- <pre><code class="typescript"><span class="hl-1">import</span><span class="hl-2"> { </span><span class="hl-4">Client</span><span class="hl-2"> } </span><span class="hl-1">from</span><span class="hl-2"> </span><span class="hl-3">&quot;iframe-coordinator/client&quot;</span><span class="hl-2">;</span><br/><br/><span class="hl-6">let</span><span class="hl-2"> </span><span class="hl-4">ifcClient</span><span class="hl-2"> = </span><span class="hl-6">new</span><span class="hl-2"> </span><span class="hl-5">Client</span><span class="hl-2">();</span><br/><br/><span class="hl-0">// envDataHandler can be used to store the data in a service module or</span><br/><span class="hl-0">// somewhere else useful for future reference</span><br/><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">addListener</span><span class="hl-2">(</span><span class="hl-3">&quot;environmentalData&quot;</span><span class="hl-2">, </span><span class="hl-4">envDataHandler</span><span class="hl-2">);</span><br/><br/><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">start</span><span class="hl-2">();</span>
1
+ <!doctype html>
2
+ <html class="default" lang="en" data-base="../">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta http-equiv="x-ua-compatible" content="IE=edge" />
6
+ <title>client-setup | iframe-coordinator - v6.5.1</title>
7
+ <meta name="description" content="Documentation for iframe-coordinator" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
9
+ <link rel="stylesheet" href="../assets/style.css" />
10
+ <link rel="stylesheet" href="../assets/highlight.css" />
11
+ <script defer src="../assets/main.js"></script>
12
+ <script async src="../assets/icons.js" id="tsd-icons-script"></script>
13
+ <script async src="../assets/search.js" id="tsd-search-script"></script>
14
+ <script async src="../assets/navigation.js" id="tsd-nav-script"></script>
15
+ </head>
16
+ <body>
17
+ <script>
18
+ document.documentElement.dataset.theme =
19
+ localStorage.getItem("tsd-theme") || "os";
20
+ document.body.style.display = "none";
21
+ setTimeout(
22
+ () =>
23
+ window.app
24
+ ? app.showPage()
25
+ : document.body.style.removeProperty("display"),
26
+ 500,
27
+ );
28
+ </script>
29
+ <header class="tsd-page-toolbar">
30
+ <div class="tsd-toolbar-contents container">
31
+ <a href="../index.html" class="title">iframe-coordinator - v6.5.1</a>
32
+ <div id="tsd-toolbar-links"></div>
33
+ <button id="tsd-search-trigger" class="tsd-widget" aria-label="Search">
34
+ <svg
35
+ width="16"
36
+ height="16"
37
+ viewBox="0 0 16 16"
38
+ fill="none"
39
+ aria-hidden="true"
40
+ >
41
+ <use href="../assets/icons.svg#icon-search"></use>
42
+ </svg>
43
+ </button>
44
+ <dialog id="tsd-search" aria-label="Search">
45
+ <input
46
+ role="combobox"
47
+ id="tsd-search-input"
48
+ aria-controls="tsd-search-results"
49
+ aria-autocomplete="list"
50
+ aria-expanded="true"
51
+ autocapitalize="off"
52
+ autocomplete="off"
53
+ placeholder="Search the docs"
54
+ maxlength="100"
55
+ />
56
+ <ul role="listbox" id="tsd-search-results"></ul>
57
+ <div id="tsd-search-status" aria-live="polite" aria-atomic="true">
58
+ <div>Preparing search index...</div>
59
+ </div>
60
+ </dialog>
61
+ <a
62
+ href="#"
63
+ class="tsd-widget menu"
64
+ id="tsd-toolbar-menu-trigger"
65
+ data-toggle="menu"
66
+ aria-label="Menu"
67
+ ><svg
68
+ width="16"
69
+ height="16"
70
+ viewBox="0 0 16 16"
71
+ fill="none"
72
+ aria-hidden="true"
73
+ >
74
+ <use href="../assets/icons.svg#icon-menu"></use></svg
75
+ ></a>
76
+ </div>
77
+ </header>
78
+ <div class="container container-main">
79
+ <div class="col-content">
80
+ <div class="tsd-page-title">
81
+ <ul class="tsd-breadcrumb" aria-label="Breadcrumb">
82
+ <li><a href="" aria-current="page">client-setup</a></li>
83
+ </ul>
84
+ </div>
85
+ <div class="tsd-panel tsd-typography">
86
+ <h1 id="client-application-setup" class="tsd-anchor-link">
87
+ Client Application Setup<a
88
+ href="#client-application-setup"
89
+ aria-label="Permalink"
90
+ class="tsd-anchor-icon"
91
+ ><svg viewBox="0 0 24 24" aria-hidden="true">
92
+ <use href="../assets/icons.svg#icon-anchor"></use></svg
93
+ ></a>
94
+ </h1>
95
+ <p>
96
+ To seamlessly integrate a client application with a host, you will
97
+ need to alter the client application's default behavior in a few
98
+ ways. Detailed instructions are below.
99
+ <em
100
+ >Navigation is the trickiest item to get correct. Be sure to read
101
+ that section carefully.</em
102
+ >
103
+ </p>
104
+ <h2 id="application-bootstrap" class="tsd-anchor-link">
105
+ Application Bootstrap<a
106
+ href="#application-bootstrap"
107
+ aria-label="Permalink"
108
+ class="tsd-anchor-icon"
109
+ ><svg viewBox="0 0 24 24" aria-hidden="true">
110
+ <use href="../assets/icons.svg#icon-anchor"></use></svg
111
+ ></a>
112
+ </h2>
113
+ <p>
114
+ Early in the application bootstrap process, you will need to create
115
+ a
116
+ <a href="../classes/client.Client.html" class="tsd-kind-class">
117
+ client.Client</a
118
+ >
119
+ instance, add an event listener for environment data passed from the
120
+ host application, and start the client.
121
+ </p>
122
+ <p>
123
+ <a
124
+ href="../interfaces/messages.EnvData.html"
125
+ class="tsd-kind-interface"
126
+ >Environment data</a
127
+ >
128
+ is data set in the host application that is static over time, but
129
+ that clients will need to function, such as the user-selected
130
+ locale. It supports both pre-defined common/required options and
131
+ custom data.
132
+ </p>
133
+ <p>
134
+ Calling
135
+ <a
136
+ href="../classes/client.Client.html#start"
137
+ class="tsd-kind-method"
138
+ >
139
+ client.Client.start</a
140
+ >
141
+ on the client sets up messaging listeners, and sends a signal to the
142
+ host application to inform it that your application is ready to
143
+ start receiving messages.
144
+ </p>
145
+ <p>
146
+ The iframe-coordinator phase of a typical client bootstrap might
147
+ look like this:
148
+ </p>
149
+ <pre><code class="typescript"><span class="hl-1">import</span><span class="hl-2"> { </span><span class="hl-4">Client</span><span class="hl-2"> } </span><span class="hl-1">from</span><span class="hl-2"> </span><span class="hl-3">&quot;iframe-coordinator/client&quot;</span><span class="hl-2">;</span><br/><br/><span class="hl-6">let</span><span class="hl-2"> </span><span class="hl-4">ifcClient</span><span class="hl-2"> = </span><span class="hl-6">new</span><span class="hl-2"> </span><span class="hl-5">Client</span><span class="hl-2">();</span><br/><br/><span class="hl-0">// envDataHandler can be used to store the data in a service module or</span><br/><span class="hl-0">// somewhere else useful for future reference</span><br/><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">addListener</span><span class="hl-2">(</span><span class="hl-3">&quot;environmentalData&quot;</span><span class="hl-2">, </span><span class="hl-4">envDataHandler</span><span class="hl-2">);</span><br/><br/><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">start</span><span class="hl-2">();</span>
14
150
  </code><button type="button">Copy</button></pre>
15
151
 
16
- <h2 id="navigation" class="tsd-anchor-link">Navigation<a href="#navigation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Creating a seamless navigation experience for users is the most challenging part of iframe-embedded
17
- applications. We need to preserve all of these experiences:</p>
18
- <ul>
19
- <li>Browser history navigation must work correctly, even if the iframe is removed from the page or
20
- navigates to a blank page when inactive</li>
21
- <li>Requests to open a link rendered in a client application in a new tab must open the whole
22
- application in the new tab, not just the client application</li>
23
- <li>Copying the link URL in a client application and sharing it with others out of band should
24
- result in them seeing the whole application, not just the embedded client</li>
25
- </ul>
26
- <h3 id="preserving-browser-history" class="tsd-anchor-link">Preserving Browser History<a href="#preserving-browser-history" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>To preserve browser history, the client application should never navigate directly to a new page.
27
- Instead, it should always request that the host application change its url. This is done with
28
- a <a href="../classes/client.Client.html#requestnavigation" class="tsd-kind-method"> client.Client.requestNavigation</a> call or by using links
29
- with <code>target=&quot;_top&quot;</code> set.</p>
30
- <h3 id="ensuring-link-urls-reference-the-host-application" class="tsd-anchor-link">Ensuring Link URLs Reference the Host Application<a href="#ensuring-link-urls-reference-the-host-application" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>Links rendered by the client application should have the <code>href</code> attribute set to the full host
31
- application URL rather than a relative path within the client. To make this easier, the client
32
- provides the <code>urlFromClientPath</code> method that can translate
33
- client application routes to the corresponding host application URL. The client application also provides the <code>urlFromHostPath</code> method that can translate a host application relative path to the full URL used in the host application.</p>
34
- <h3 id="using-custom-elements-to-create-links" class="tsd-anchor-link">Using Custom Elements to Create Links<a href="#using-custom-elements-to-create-links" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>To further simplify the generation of these links, there are custom elements that can be used to create links. These elements are <code>ifc-client-link</code> and <code>ifc-host-link</code>. These custom elements are registered and provided by the client. These custom elements require a <code>path</code> attribute with the relative path (either client or host) that will be used to create the full URL. The <code>ifc-client-link</code> custom element uses the <code>urlFromClientPath</code> method to translate a client application route provided in the <code>path</code> attribute to a full URL. The <code>ifc-host-link</code> custom element uses the <code>urlFromHostPath</code> method to translate a host application route provided in the <code>path</code> attribute to a full URL.</p>
35
- <h3 id="examples" class="tsd-anchor-link">Examples<a href="#examples" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>Here are some basic examples of how you might generate links or request navigation in your
36
- application. If you are using an application framework such as Vue, Angular, etc, you may need to
37
- wrap, extend, or avoid built-in navigation and link generation utilities.</p>
38
- <p><strong>Programmatically Navigating</strong></p>
39
- <pre><code class="typescript"><span class="hl-0">// Navigate to a new route in the client app: /foo/bar</span><br/><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">requestNavigation</span><span class="hl-2">({ </span><span class="hl-4">url:</span><span class="hl-2"> </span><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">urlFromClientPath</span><span class="hl-2">(</span><span class="hl-3">&quot;/foo/bar&quot;</span><span class="hl-2">) });</span><br/><br/><span class="hl-0">// Navigate to a host application route</span><br/><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">requestNavigation</span><span class="hl-2">({ </span><span class="hl-4">url:</span><span class="hl-2"> </span><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">urlFromHostPath</span><span class="hl-2">(</span><span class="hl-3">&quot;/path&quot;</span><span class="hl-2">) });</span><br/><br/><span class="hl-0">// Navigate to a 3rd party url</span><br/><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">requestNavigation</span><span class="hl-2">({ </span><span class="hl-4">url:</span><span class="hl-2"> </span><span class="hl-3">&quot;https://external-site.com/external/path&quot;</span><span class="hl-2"> });</span>
152
+ <h2 id="navigation" class="tsd-anchor-link">
153
+ Navigation<a
154
+ href="#navigation"
155
+ aria-label="Permalink"
156
+ class="tsd-anchor-icon"
157
+ ><svg viewBox="0 0 24 24" aria-hidden="true">
158
+ <use href="../assets/icons.svg#icon-anchor"></use></svg
159
+ ></a>
160
+ </h2>
161
+ <p>
162
+ Creating a seamless navigation experience for users is the most
163
+ challenging part of iframe-embedded applications. We need to
164
+ preserve all of these experiences:
165
+ </p>
166
+ <ul>
167
+ <li>
168
+ Browser history navigation must work correctly, even if the iframe
169
+ is removed from the page or navigates to a blank page when
170
+ inactive
171
+ </li>
172
+ <li>
173
+ Requests to open a link rendered in a client application in a new
174
+ tab must open the whole application in the new tab, not just the
175
+ client application
176
+ </li>
177
+ <li>
178
+ Copying the link URL in a client application and sharing it with
179
+ others out of band should result in them seeing the whole
180
+ application, not just the embedded client
181
+ </li>
182
+ </ul>
183
+ <h3 id="preserving-browser-history" class="tsd-anchor-link">
184
+ Preserving Browser History<a
185
+ href="#preserving-browser-history"
186
+ aria-label="Permalink"
187
+ class="tsd-anchor-icon"
188
+ ><svg viewBox="0 0 24 24" aria-hidden="true">
189
+ <use href="../assets/icons.svg#icon-anchor"></use></svg
190
+ ></a>
191
+ </h3>
192
+ <p>
193
+ To preserve browser history, the client application should never
194
+ navigate directly to a new page. Instead, it should always request
195
+ that the host application change its url. This is done with a
196
+ <a
197
+ href="../classes/client.Client.html#requestnavigation"
198
+ class="tsd-kind-method"
199
+ >
200
+ client.Client.requestNavigation</a
201
+ >
202
+ call or by using links with
203
+ <code>target=&quot;_top&quot;</code> set.
204
+ </p>
205
+ <h3
206
+ id="ensuring-link-urls-reference-the-host-application"
207
+ class="tsd-anchor-link"
208
+ >
209
+ Ensuring Link URLs Reference the Host Application<a
210
+ href="#ensuring-link-urls-reference-the-host-application"
211
+ aria-label="Permalink"
212
+ class="tsd-anchor-icon"
213
+ ><svg viewBox="0 0 24 24" aria-hidden="true">
214
+ <use href="../assets/icons.svg#icon-anchor"></use></svg
215
+ ></a>
216
+ </h3>
217
+ <p>
218
+ Links rendered by the client application should have the
219
+ <code>href</code> attribute set to the full host application URL
220
+ rather than a relative path within the client. To make this easier,
221
+ the client provides the <code>urlFromClientPath</code> method that
222
+ can translate client application routes to the corresponding host
223
+ application URL. The client application also provides the
224
+ <code>urlFromHostPath</code> method that can translate a host
225
+ application relative path to the full URL used in the host
226
+ application.
227
+ </p>
228
+ <h3
229
+ id="using-custom-elements-to-create-links"
230
+ class="tsd-anchor-link"
231
+ >
232
+ Using Custom Elements to Create Links<a
233
+ href="#using-custom-elements-to-create-links"
234
+ aria-label="Permalink"
235
+ class="tsd-anchor-icon"
236
+ ><svg viewBox="0 0 24 24" aria-hidden="true">
237
+ <use href="../assets/icons.svg#icon-anchor"></use></svg
238
+ ></a>
239
+ </h3>
240
+ <p>
241
+ To further simplify the generation of these links, there are custom
242
+ elements that can be used to create links. These elements are
243
+ <code>ifc-client-link</code> and <code>ifc-host-link</code>. These
244
+ custom elements are registered and provided by the client. These
245
+ custom elements require a <code>path</code> attribute with the
246
+ relative path (either client or host) that will be used to create
247
+ the full URL. The <code>ifc-client-link</code> custom element uses
248
+ the <code>urlFromClientPath</code> method to translate a client
249
+ application route provided in the <code>path</code> attribute to a
250
+ full URL. The <code>ifc-host-link</code> custom element uses the
251
+ <code>urlFromHostPath</code> method to translate a host application
252
+ route provided in the <code>path</code> attribute to a full URL.
253
+ </p>
254
+ <h3 id="examples" class="tsd-anchor-link">
255
+ Examples<a
256
+ href="#examples"
257
+ aria-label="Permalink"
258
+ class="tsd-anchor-icon"
259
+ ><svg viewBox="0 0 24 24" aria-hidden="true">
260
+ <use href="../assets/icons.svg#icon-anchor"></use></svg
261
+ ></a>
262
+ </h3>
263
+ <p>
264
+ Here are some basic examples of how you might generate links or
265
+ request navigation in your application. If you are using an
266
+ application framework such as Vue, Angular, etc, you may need to
267
+ wrap, extend, or avoid built-in navigation and link generation
268
+ utilities.
269
+ </p>
270
+ <p><strong>Programmatically Navigating</strong></p>
271
+ <pre><code class="typescript"><span class="hl-0">// Navigate to a new route in the client app: /foo/bar</span><br/><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">requestNavigation</span><span class="hl-2">({ </span><span class="hl-4">url:</span><span class="hl-2"> </span><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">urlFromClientPath</span><span class="hl-2">(</span><span class="hl-3">&quot;/foo/bar&quot;</span><span class="hl-2">) });</span><br/><br/><span class="hl-0">// Navigate to a host application route</span><br/><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">requestNavigation</span><span class="hl-2">({ </span><span class="hl-4">url:</span><span class="hl-2"> </span><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">urlFromHostPath</span><span class="hl-2">(</span><span class="hl-3">&quot;/path&quot;</span><span class="hl-2">) });</span><br/><br/><span class="hl-0">// Navigate to a 3rd party url</span><br/><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">requestNavigation</span><span class="hl-2">({ </span><span class="hl-4">url:</span><span class="hl-2"> </span><span class="hl-3">&quot;https://external-site.com/external/path&quot;</span><span class="hl-2"> });</span>
40
272
  </code><button type="button">Copy</button></pre>
41
273
 
42
- <p><strong>Generating Links</strong></p>
43
- <pre><code class="typescript"><span class="hl-6">let</span><span class="hl-2"> </span><span class="hl-4">internalLink</span><span class="hl-2"> = </span><span class="hl-3">`&lt;a href=&quot;</span><span class="hl-6">${</span><span class="hl-4">ifcClient</span><span class="hl-15">.</span><span class="hl-5">urlFromClientPath</span><span class="hl-15">(</span><br/><span class="hl-15"> </span><span class="hl-3">&quot;foo/bar&quot;</span><span class="hl-15">,</span><br/><span class="hl-15">)</span><span class="hl-6">}</span><span class="hl-3">&quot; target=&quot;_top&quot;&gt;Internal Link&lt;/a&gt;`</span><span class="hl-2">;</span><br/><br/><span class="hl-6">let</span><span class="hl-2"> </span><span class="hl-4">hostLink</span><span class="hl-2"> = </span><span class="hl-3">`&lt;a href=&quot;</span><span class="hl-6">${</span><span class="hl-4">ifcClient</span><span class="hl-15">.</span><span class="hl-5">urlFromHostPath</span><span class="hl-15">(</span><br/><span class="hl-15"> </span><span class="hl-3">&quot;/path&quot;</span><span class="hl-15">,</span><br/><span class="hl-15">)</span><span class="hl-6">}</span><span class="hl-3">&quot; target=&quot;_top&quot;&gt;Internal Link&lt;/a&gt;`</span><span class="hl-2">;</span><br/><br/><span class="hl-6">let</span><span class="hl-2"> </span><span class="hl-4">externalLink</span><span class="hl-2"> = </span><span class="hl-3">`&lt;a href=&quot;https://external-site.com/external/path&quot; target=&quot;_top&quot;&gt;Internal Link&lt;/a&gt;`</span><span class="hl-2">;</span>
274
+ <p><strong>Generating Links</strong></p>
275
+ <pre><code class="typescript"><span class="hl-6">let</span><span class="hl-2"> </span><span class="hl-4">internalLink</span><span class="hl-2"> = </span><span class="hl-3">`&lt;a href=&quot;</span><span class="hl-6">${</span><span class="hl-4">ifcClient</span><span class="hl-15">.</span><span class="hl-5">urlFromClientPath</span><span class="hl-15">(</span><br/><span class="hl-15"> </span><span class="hl-3">&quot;foo/bar&quot;</span><span class="hl-15">,</span><br/><span class="hl-15">)</span><span class="hl-6">}</span><span class="hl-3">&quot; target=&quot;_top&quot;&gt;Internal Link&lt;/a&gt;`</span><span class="hl-2">;</span><br/><br/><span class="hl-6">let</span><span class="hl-2"> </span><span class="hl-4">hostLink</span><span class="hl-2"> = </span><span class="hl-3">`&lt;a href=&quot;</span><span class="hl-6">${</span><span class="hl-4">ifcClient</span><span class="hl-15">.</span><span class="hl-5">urlFromHostPath</span><span class="hl-15">(</span><br/><span class="hl-15"> </span><span class="hl-3">&quot;/path&quot;</span><span class="hl-15">,</span><br/><span class="hl-15">)</span><span class="hl-6">}</span><span class="hl-3">&quot; target=&quot;_top&quot;&gt;Internal Link&lt;/a&gt;`</span><span class="hl-2">;</span><br/><br/><span class="hl-6">let</span><span class="hl-2"> </span><span class="hl-4">externalLink</span><span class="hl-2"> = </span><span class="hl-3">`&lt;a href=&quot;https://external-site.com/external/path&quot; target=&quot;_top&quot;&gt;Internal Link&lt;/a&gt;`</span><span class="hl-2">;</span>
44
276
  </code><button type="button">Copy</button></pre>
45
277
 
46
- <p><strong>Generating Links Using Custom Elements</strong></p>
47
- <pre><code class="html"><span class="hl-0">&lt;!-- Creates a link to a new route in the client app: /foo/bar --&gt;</span><br/><span class="hl-7">&lt;</span><span class="hl-8">ifc-client-link</span><span class="hl-2"> </span><span class="hl-9">path</span><span class="hl-2">=</span><span class="hl-10">&quot;/foo/bar&quot;</span><span class="hl-7">&gt;</span><span class="hl-2">Internal Link</span><span class="hl-7">&lt;/</span><span class="hl-8">ifc-client-link</span><span class="hl-7">&gt;</span><br/><br/><span class="hl-0">&lt;!-- Creates a link to a host application route: /path --&gt;</span><br/><span class="hl-7">&lt;</span><span class="hl-8">ifc-host-link</span><span class="hl-2"> </span><span class="hl-9">path</span><span class="hl-2">=</span><span class="hl-10">&quot;/path&quot;</span><span class="hl-7">&gt;</span><span class="hl-2">Internal Link</span><span class="hl-7">&lt;/</span><span class="hl-8">ifc-host-link</span><span class="hl-7">&gt;</span>
278
+ <p><strong>Generating Links Using Custom Elements</strong></p>
279
+ <pre><code class="html"><span class="hl-0">&lt;!-- Creates a link to a new route in the client app: /foo/bar --&gt;</span><br/><span class="hl-7">&lt;</span><span class="hl-8">ifc-client-link</span><span class="hl-2"> </span><span class="hl-9">path</span><span class="hl-2">=</span><span class="hl-10">&quot;/foo/bar&quot;</span><span class="hl-7">&gt;</span><span class="hl-2">Internal Link</span><span class="hl-7">&lt;/</span><span class="hl-8">ifc-client-link</span><span class="hl-7">&gt;</span><br/><br/><span class="hl-0">&lt;!-- Creates a link to a host application route: /path --&gt;</span><br/><span class="hl-7">&lt;</span><span class="hl-8">ifc-host-link</span><span class="hl-2"> </span><span class="hl-9">path</span><span class="hl-2">=</span><span class="hl-10">&quot;/path&quot;</span><span class="hl-7">&gt;</span><span class="hl-2">Internal Link</span><span class="hl-7">&lt;/</span><span class="hl-8">ifc-host-link</span><span class="hl-7">&gt;</span>
48
280
  </code><button type="button">Copy</button></pre>
49
281
 
50
- <h2 id="providing-page-metadata" class="tsd-anchor-link">Providing Page Metadata<a href="#providing-page-metadata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>When your application loads a page, you may want to provide metadata to the host application to improve the user experience. This is done with
51
- a <a href="../classes/client.Client.html#sendpagemetadata" class="tsd-kind-method"> client.Client.sendPageMetadata</a> call.</p>
52
- <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">sendPageMetadata</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-0">// The localized title for your page</span><br/><span class="hl-2"> </span><span class="hl-4">title:</span><span class="hl-2"> </span><span class="hl-3">&quot;My Cool Feature&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-0">// An array of breadcrumbs to be displayed</span><br/><span class="hl-2"> </span><span class="hl-4">breadcrumbs:</span><span class="hl-2"> [{ </span><span class="hl-4">text:</span><span class="hl-2"> </span><span class="hl-3">&quot;Home&quot;</span><span class="hl-2">, </span><span class="hl-4">href:</span><span class="hl-2"> </span><span class="hl-3">&quot;/home&quot;</span><span class="hl-2"> }],</span><br/><span class="hl-2"> </span><span class="hl-0">// Optionally, any additional data that your host expects</span><br/><span class="hl-2"> </span><span class="hl-4">custom:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">foo:</span><span class="hl-2"> </span><span class="hl-3">&quot;bar&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
282
+ <h2 id="providing-page-metadata" class="tsd-anchor-link">
283
+ Providing Page Metadata<a
284
+ href="#providing-page-metadata"
285
+ aria-label="Permalink"
286
+ class="tsd-anchor-icon"
287
+ ><svg viewBox="0 0 24 24" aria-hidden="true">
288
+ <use href="../assets/icons.svg#icon-anchor"></use></svg
289
+ ></a>
290
+ </h2>
291
+ <p>
292
+ When your application loads a page, you may want to provide metadata
293
+ to the host application to improve the user experience. This is done
294
+ with a
295
+ <a
296
+ href="../classes/client.Client.html#sendpagemetadata"
297
+ class="tsd-kind-method"
298
+ >
299
+ client.Client.sendPageMetadata</a
300
+ >
301
+ call.
302
+ </p>
303
+ <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">sendPageMetadata</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-0">// The localized title for your page</span><br/><span class="hl-2"> </span><span class="hl-4">title:</span><span class="hl-2"> </span><span class="hl-3">&quot;My Cool Feature&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-0">// An array of breadcrumbs to be displayed</span><br/><span class="hl-2"> </span><span class="hl-4">breadcrumbs:</span><span class="hl-2"> [{ </span><span class="hl-4">text:</span><span class="hl-2"> </span><span class="hl-3">&quot;Home&quot;</span><span class="hl-2">, </span><span class="hl-4">href:</span><span class="hl-2"> </span><span class="hl-3">&quot;/home&quot;</span><span class="hl-2"> }],</span><br/><span class="hl-2"> </span><span class="hl-0">// Optionally, any additional data that your host expects</span><br/><span class="hl-2"> </span><span class="hl-4">custom:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">foo:</span><span class="hl-2"> </span><span class="hl-3">&quot;bar&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
53
304
  </code><button type="button">Copy</button></pre>
54
305
 
55
- <p>The frame-router element will emit a custom event of 'pageMetadata' with the PageMetaData object in the detail property.</p>
56
- <h2 id="requesting-host-actions" class="tsd-anchor-link">Requesting Host Actions<a href="#requesting-host-actions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>There are common requests a client application will want to make of a host application and we strive
57
- to provide nice default APIs for these.</p>
58
- <p>Currently there are four implemented:</p>
59
- <p><a href="../classes/client.Client.html#requestnotification" class="tsd-kind-method"> client.Client.requestNotification</a>, which asks the host
60
- app to send a notification message to the user.</p>
61
- <p><a href="../classes/client.Client.html#requestmodal" class="tsd-kind-method"> client.Client.requestModal</a>, which asks the host
62
- app to launch a modal identified by a given ID, also accepts initial setup data specific to that modal.</p>
63
- <p><a href="../classes/client.Client.html#requestpromptonleave" class="tsd-kind-method"> client.Client.requestPromptOnLeave</a>, which asks the host
64
- app to display a prompt on leave dialog to the user before navigating.</p>
65
- <p><a href="../classes/client.Client.html#clearpromptonleave" class="tsd-kind-method"> client.Client.clearPromptOnLeave</a>, which asks the host
66
- app to clear the prompt on leave dialog before navigating.</p>
67
- <p>A client application may request a modal on the host like so:</p>
68
- <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">requestModal</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-4">modalType:</span><span class="hl-2"> </span><span class="hl-3">&#39;idOfTheModalToDisplay&#39;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">modalData:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">id:</span><span class="hl-2"> </span><span class="hl-3">&#39;1234567890&#39;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">userList :</span><span class="hl-2"> [{</span><span class="hl-4">id:</span><span class="hl-2"> </span><span class="hl-3">&#39;2345678901&#39;</span><span class="hl-2">, </span><span class="hl-4">name:</span><span class="hl-2"> </span><span class="hl-3">&#39;User1&#39;</span><span class="hl-2">}]</span><br/><span class="hl-2">});</span>
306
+ <p>
307
+ The frame-router element will emit a custom event of 'pageMetadata'
308
+ with the PageMetaData object in the detail property.
309
+ </p>
310
+ <h2 id="requesting-host-actions" class="tsd-anchor-link">
311
+ Requesting Host Actions<a
312
+ href="#requesting-host-actions"
313
+ aria-label="Permalink"
314
+ class="tsd-anchor-icon"
315
+ ><svg viewBox="0 0 24 24" aria-hidden="true">
316
+ <use href="../assets/icons.svg#icon-anchor"></use></svg
317
+ ></a>
318
+ </h2>
319
+ <p>
320
+ There are common requests a client application will want to make of
321
+ a host application and we strive to provide nice default APIs for
322
+ these.
323
+ </p>
324
+ <p>Currently there are four implemented:</p>
325
+ <p>
326
+ <a
327
+ href="../classes/client.Client.html#requestnotification"
328
+ class="tsd-kind-method"
329
+ >
330
+ client.Client.requestNotification</a
331
+ >, which asks the host app to send a notification message to the
332
+ user.
333
+ </p>
334
+ <p>
335
+ <a
336
+ href="../classes/client.Client.html#requestmodal"
337
+ class="tsd-kind-method"
338
+ >
339
+ client.Client.requestModal</a
340
+ >, which asks the host app to launch a modal identified by a given
341
+ ID, also accepts initial setup data specific to that modal.
342
+ </p>
343
+ <p>
344
+ <a
345
+ href="../classes/client.Client.html#requestpromptonleave"
346
+ class="tsd-kind-method"
347
+ >
348
+ client.Client.requestPromptOnLeave</a
349
+ >, which asks the host app to display a prompt on leave dialog to
350
+ the user before navigating.
351
+ </p>
352
+ <p>
353
+ <a
354
+ href="../classes/client.Client.html#clearpromptonleave"
355
+ class="tsd-kind-method"
356
+ >
357
+ client.Client.clearPromptOnLeave</a
358
+ >, which asks the host app to clear the prompt on leave dialog
359
+ before navigating.
360
+ </p>
361
+ <p>A client application may request a modal on the host like so:</p>
362
+ <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">requestModal</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-4">modalType:</span><span class="hl-2"> </span><span class="hl-3">&#39;idOfTheModalToDisplay&#39;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">modalData:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">id:</span><span class="hl-2"> </span><span class="hl-3">&#39;1234567890&#39;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">userList :</span><span class="hl-2"> [{</span><span class="hl-4">id:</span><span class="hl-2"> </span><span class="hl-3">&#39;2345678901&#39;</span><span class="hl-2">, </span><span class="hl-4">name:</span><span class="hl-2"> </span><span class="hl-3">&#39;User1&#39;</span><span class="hl-2">}]</span><br/><span class="hl-2">});</span>
69
363
  </code><button type="button">Copy</button></pre>
70
364
 
71
- <p>The frame-router element will emit a custom event of 'modalRequest' with the ModalRequest object in the detail property.</p>
72
- <p>A client application may request a prompt on leave dialog on the host like so:</p>
73
- <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">requestPromptOnLeave</span><span class="hl-2">();</span>
365
+ <p>
366
+ The frame-router element will emit a custom event of 'modalRequest'
367
+ with the ModalRequest object in the detail property.
368
+ </p>
369
+ <p>
370
+ A client application may request a prompt on leave dialog on the
371
+ host like so:
372
+ </p>
373
+ <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">requestPromptOnLeave</span><span class="hl-2">();</span>
74
374
  </code><button type="button">Copy</button></pre>
75
375
 
76
- <p>The frame-router element will emit a custom event of 'promptOnLeave' with the PromptOnLeave object in the detail property.</p>
77
- <p>A client application may request to clear the prompt on leave dialog on the host like so:</p>
78
- <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">clearPromptOnLeave</span><span class="hl-2">();</span>
376
+ <p>
377
+ The frame-router element will emit a custom event of 'promptOnLeave'
378
+ with the PromptOnLeave object in the detail property.
379
+ </p>
380
+ <p>
381
+ A client application may request to clear the prompt on leave dialog
382
+ on the host like so:
383
+ </p>
384
+ <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">clearPromptOnLeave</span><span class="hl-2">();</span>
79
385
  </code><button type="button">Copy</button></pre>
80
386
 
81
- <p>The frame-router element will emit a custom event 'promptOnLeave' with the PromptOnLeave object in the detail property.</p>
82
- <h2 id="custom-clienthost-messaging" class="tsd-anchor-link">Custom Client/Host Messaging<a href="#custom-clienthost-messaging" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Client and Host applications may also need to communicate about topics specific to their use case.
83
- iframe-coordinator provides a lightweight pub-sub wrapper around the
84
- <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage">postmessage api</a> to meet that
85
- need with a consistent message interface.</p>
86
- <p>You can publish messages to the host application via the <a href="../classes/client.Client.html#publish" class="tsd-kind-method"> client.Client.publish</a> method.</p>
87
- <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">publish</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-4">topic:</span><span class="hl-2"> </span><span class="hl-3">&quot;please.do.the.thing&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">payload:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">foo:</span><span class="hl-2"> </span><span class="hl-3">&quot;bar&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">baz:</span><span class="hl-2"> </span><span class="hl-3">&quot;qux&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
387
+ <p>
388
+ The frame-router element will emit a custom event 'promptOnLeave'
389
+ with the PromptOnLeave object in the detail property.
390
+ </p>
391
+ <h2 id="custom-clienthost-messaging" class="tsd-anchor-link">
392
+ Custom Client/Host Messaging<a
393
+ href="#custom-clienthost-messaging"
394
+ aria-label="Permalink"
395
+ class="tsd-anchor-icon"
396
+ ><svg viewBox="0 0 24 24" aria-hidden="true">
397
+ <use href="../assets/icons.svg#icon-anchor"></use></svg
398
+ ></a>
399
+ </h2>
400
+ <p>
401
+ Client and Host applications may also need to communicate about
402
+ topics specific to their use case. iframe-coordinator provides a
403
+ lightweight pub-sub wrapper around the
404
+ <a
405
+ href="https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage"
406
+ >postmessage api</a
407
+ >
408
+ to meet that need with a consistent message interface.
409
+ </p>
410
+ <p>
411
+ You can publish messages to the host application via the
412
+ <a
413
+ href="../classes/client.Client.html#publish"
414
+ class="tsd-kind-method"
415
+ >
416
+ client.Client.publish</a
417
+ >
418
+ method.
419
+ </p>
420
+ <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-5">publish</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-4">topic:</span><span class="hl-2"> </span><span class="hl-3">&quot;please.do.the.thing&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">payload:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">foo:</span><span class="hl-2"> </span><span class="hl-3">&quot;bar&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">baz:</span><span class="hl-2"> </span><span class="hl-3">&quot;qux&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
88
421
  </code><button type="button">Copy</button></pre>
89
422
 
90
- <p>You can listen for messages from the host on a topic via the <a href="../interfaces/client.EventEmitter.html" class="tsd-kind-interface">messaging API</a></p>
91
- <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-4">messaging</span><span class="hl-2">.</span><span class="hl-5">addEventListener</span><span class="hl-2">(</span><span class="hl-3">&quot;topic.from.host&quot;</span><span class="hl-2">, </span><span class="hl-4">payloadHandler</span><span class="hl-2">);</span>
423
+ <p>
424
+ You can listen for messages from the host on a topic via the
425
+ <a
426
+ href="../interfaces/client.EventEmitter.html"
427
+ class="tsd-kind-interface"
428
+ >messaging API</a
429
+ >
430
+ </p>
431
+ <pre><code class="typescript"><span class="hl-4">ifcClient</span><span class="hl-2">.</span><span class="hl-4">messaging</span><span class="hl-2">.</span><span class="hl-5">addEventListener</span><span class="hl-2">(</span><span class="hl-3">&quot;topic.from.host&quot;</span><span class="hl-2">, </span><span class="hl-4">payloadHandler</span><span class="hl-2">);</span>
92
432
  </code><button type="button">Copy</button></pre>
93
-
94
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#client-application-setup"><span>Client <wbr/>Application <wbr/>Setup</span></a><ul><li><a href="#application-bootstrap"><span>Application <wbr/>Bootstrap</span></a></li><li><a href="#navigation"><span>Navigation</span></a></li><li><ul><li><a href="#preserving-browser-history"><span>Preserving <wbr/>Browser <wbr/>History</span></a></li><li><a href="#ensuring-link-urls-reference-the-host-application"><span>Ensuring <wbr/>Link <wbr/>UR<wbr/>Ls <wbr/>Reference the <wbr/>Host <wbr/>Application</span></a></li><li><a href="#using-custom-elements-to-create-links"><span>Using <wbr/>Custom <wbr/>Elements to <wbr/>Create <wbr/>Links</span></a></li><li><a href="#examples"><span>Examples</span></a></li></ul></li><li><a href="#providing-page-metadata"><span>Providing <wbr/>Page <wbr/>Metadata</span></a></li><li><a href="#requesting-host-actions"><span>Requesting <wbr/>Host <wbr/>Actions</span></a></li><li><a href="#custom-clienthost-messaging"><span>Custom <wbr/>Client/<wbr/>Host <wbr/>Messaging</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">iframe-coordinator - v6.5.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
433
+ </div>
434
+ </div>
435
+ <div class="col-sidebar">
436
+ <div class="page-menu">
437
+ <div class="tsd-navigation settings">
438
+ <details class="tsd-accordion">
439
+ <summary class="tsd-accordion-summary">
440
+ <svg
441
+ width="20"
442
+ height="20"
443
+ viewBox="0 0 24 24"
444
+ fill="none"
445
+ aria-hidden="true"
446
+ >
447
+ <use href="../assets/icons.svg#icon-chevronDown"></use>
448
+ </svg>
449
+ <h3>Settings</h3>
450
+ </summary>
451
+ <div class="tsd-accordion-details">
452
+ <div class="tsd-filter-visibility">
453
+ <span class="settings-label">Member Visibility</span>
454
+ <ul id="tsd-filter-options">
455
+ <li class="tsd-filter-item">
456
+ <label class="tsd-filter-input"
457
+ ><input
458
+ type="checkbox"
459
+ id="tsd-filter-inherited"
460
+ name="inherited"
461
+ checked
462
+ /><svg
463
+ width="32"
464
+ height="32"
465
+ viewBox="0 0 32 32"
466
+ aria-hidden="true"
467
+ >
468
+ <rect
469
+ class="tsd-checkbox-background"
470
+ width="30"
471
+ height="30"
472
+ x="1"
473
+ y="1"
474
+ rx="6"
475
+ fill="none"
476
+ ></rect>
477
+ <path
478
+ class="tsd-checkbox-checkmark"
479
+ d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25"
480
+ stroke="none"
481
+ stroke-width="3.5"
482
+ stroke-linejoin="round"
483
+ fill="none"
484
+ ></path></svg
485
+ ><span>Inherited</span></label
486
+ >
487
+ </li>
488
+ </ul>
489
+ </div>
490
+ <div class="tsd-theme-toggle">
491
+ <label class="settings-label" for="tsd-theme">Theme</label
492
+ ><select id="tsd-theme">
493
+ <option value="os">OS</option>
494
+ <option value="light">Light</option>
495
+ <option value="dark">Dark</option>
496
+ </select>
497
+ </div>
498
+ </div>
499
+ </details>
500
+ </div>
501
+ <details open class="tsd-accordion tsd-page-navigation">
502
+ <summary class="tsd-accordion-summary">
503
+ <svg
504
+ width="20"
505
+ height="20"
506
+ viewBox="0 0 24 24"
507
+ fill="none"
508
+ aria-hidden="true"
509
+ >
510
+ <use href="../assets/icons.svg#icon-chevronDown"></use>
511
+ </svg>
512
+ <h3>On This Page</h3>
513
+ </summary>
514
+ <div class="tsd-accordion-details">
515
+ <a href="#client-application-setup"
516
+ ><span>Client <wbr />Application <wbr />Setup</span></a
517
+ >
518
+ <ul>
519
+ <li>
520
+ <a href="#application-bootstrap"
521
+ ><span>Application <wbr />Bootstrap</span></a
522
+ >
523
+ </li>
524
+ <li>
525
+ <a href="#navigation"><span>Navigation</span></a>
526
+ </li>
527
+ <li>
528
+ <ul>
529
+ <li>
530
+ <a href="#preserving-browser-history"
531
+ ><span
532
+ >Preserving <wbr />Browser <wbr />History</span
533
+ ></a
534
+ >
535
+ </li>
536
+ <li>
537
+ <a
538
+ href="#ensuring-link-urls-reference-the-host-application"
539
+ ><span
540
+ >Ensuring <wbr />Link <wbr />UR<wbr />Ls
541
+ <wbr />Reference the <wbr />Host
542
+ <wbr />Application</span
543
+ ></a
544
+ >
545
+ </li>
546
+ <li>
547
+ <a href="#using-custom-elements-to-create-links"
548
+ ><span
549
+ >Using <wbr />Custom <wbr />Elements to <wbr />Create
550
+ <wbr />Links</span
551
+ ></a
552
+ >
553
+ </li>
554
+ <li>
555
+ <a href="#examples"><span>Examples</span></a>
556
+ </li>
557
+ </ul>
558
+ </li>
559
+ <li>
560
+ <a href="#providing-page-metadata"
561
+ ><span>Providing <wbr />Page <wbr />Metadata</span></a
562
+ >
563
+ </li>
564
+ <li>
565
+ <a href="#requesting-host-actions"
566
+ ><span>Requesting <wbr />Host <wbr />Actions</span></a
567
+ >
568
+ </li>
569
+ <li>
570
+ <a href="#custom-clienthost-messaging"
571
+ ><span
572
+ >Custom <wbr />Client/<wbr />Host <wbr />Messaging</span
573
+ ></a
574
+ >
575
+ </li>
576
+ </ul>
577
+ </div>
578
+ </details>
579
+ </div>
580
+ <div class="site-menu">
581
+ <nav class="tsd-navigation">
582
+ <a href="../modules.html">iframe-coordinator - v6.5.1</a>
583
+ <ul class="tsd-small-nested-navigation" id="tsd-nav-container">
584
+ <li>Loading...</li>
585
+ </ul>
586
+ </nav>
587
+ </div>
588
+ </div>
589
+ </div>
590
+ <footer>
591
+ <p class="tsd-generator">
592
+ Generated using
593
+ <a href="https://typedoc.org/" target="_blank">TypeDoc</a>
594
+ </p>
595
+ </footer>
596
+ <div class="overlay"></div>
597
+ </body>
598
+ </html>