@openfin/core-web 0.44.45 → 0.44.47
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.
- package/docs/platform-developer-guide.md +42 -5
- package/docs/web-application-developer-guide.md +29 -3
- package/out/api-client.cjs.js +1 -1
- package/out/api-client.d.ts +11 -0
- package/out/api-client.esm.js +1 -1
- package/out/docs/assets/highlight.css +2 -9
- package/out/docs/assets/navigation.js +1 -1
- package/out/docs/assets/search.js +1 -1
- package/out/docs/documents/OpenFin_Web_Application_Developer_Guide.html +9 -1
- package/out/docs/documents/Platform_Developer_Guide.html +17 -5
- package/out/docs/interfaces/_openfin_core_web.CustomLogger.html +5 -0
- package/out/docs/modules/_openfin_core_web.html +2 -1
- package/out/docs/types/_openfin_core_web.BaseConfig.html +2 -1
- package/out/docs/types/_openfin_core_web_iframe_broker.ConnectionOptions.html +1 -1
- package/out/iframe-broker.cjs.js +1 -1
- package/out/iframe-broker.d.ts +8 -0
- package/out/iframe-broker.esm.js +1 -1
- package/out/{main-97295417.js → main-0c9f019d.js} +1 -1
- package/out/main-7597f01d.js +1 -0
- package/out/{main-d53455e0.js → main-c7ee609b.js} +1 -1
- package/out/{main-09238a78.js → main-ee84a001.js} +1 -1
- package/out/shared-worker.js +1 -1
- package/package.json +2 -2
- package/out/main-73b9c360.js +0 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
title: Platform Developer Guide
|
|
3
3
|
group: Guides
|
|
4
4
|
---
|
|
5
|
+
|
|
5
6
|
# Platform Developer Guide
|
|
6
7
|
|
|
7
8
|
If you are a Platform owner who wants to include OpenFin's web capabilities in your platform, there are a few steps required. This section will guide you through the process of setting up an environment. Please note, none of these steps are necessary for content developers (See the [content developer guide](web-application-developer-guide.md)).
|
|
@@ -32,11 +33,11 @@ In order to build a Web Broker, the following requirements must be met:
|
|
|
32
33
|
|
|
33
34
|
```typescript
|
|
34
35
|
// Runs on https://www.example.com/web-broker
|
|
35
|
-
import {init} from '@openfin/core-web/iframe-broker;
|
|
36
|
+
import { init } from '@openfin/core-web/iframe-broker';
|
|
36
37
|
|
|
37
38
|
const sharedWorkerUrl = 'https://www.example.com/mysharedworker.js';
|
|
38
39
|
|
|
39
|
-
await init({sharedWorkerUrl})
|
|
40
|
+
await init({ sharedWorkerUrl });
|
|
40
41
|
```
|
|
41
42
|
|
|
42
43
|
Here is a basic example of hosting a Web Broker:
|
|
@@ -121,6 +122,44 @@ const fin = await connect({
|
|
|
121
122
|
});
|
|
122
123
|
```
|
|
123
124
|
|
|
125
|
+
### Example: Capture debug logs to your own services
|
|
126
|
+
|
|
127
|
+
`@openfin/core-web` enables capturing logs via an optional `logger` connection option. It accepts an implementation of `CustomLogger`, which allows you to forward logs to your own logging infrastructure or external services.
|
|
128
|
+
|
|
129
|
+
The `CustomLogger` interface requires four methods: `debug`, `info`, `warn`, and `error`, each accepting a string message.
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
import { connect, type CustomLogger } from '@openfin/core-web';
|
|
133
|
+
|
|
134
|
+
const myLogger: CustomLogger = {
|
|
135
|
+
debug: (message: string) => {...},
|
|
136
|
+
info: (message: string) => {...},
|
|
137
|
+
warn: (message: string) => {...},
|
|
138
|
+
error: (message: string) => {...}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const fin = await connect({
|
|
142
|
+
...,
|
|
143
|
+
logger: myLogger,
|
|
144
|
+
logLevel: 'debug'
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
> **Note:** The `logger` option respects the `logLevel` setting. Only messages at or above the specified level will get propagated.
|
|
149
|
+
|
|
150
|
+
Similar functionality exists for setting up a web broker:
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
import { init } from '@openfin/core-web/iframe-broker';
|
|
154
|
+
import { type CustomLogger } from '@openfin/core-web';
|
|
155
|
+
|
|
156
|
+
init({
|
|
157
|
+
...,
|
|
158
|
+
logger: myLogger,
|
|
159
|
+
logLevel: 'debug'
|
|
160
|
+
});
|
|
161
|
+
```
|
|
162
|
+
|
|
124
163
|
## Create Layouts
|
|
125
164
|
|
|
126
165
|
Layouts in the web are very similar to the desktop OpenFin environment. They consist of a layout configuration that describes the rows/columns/view components. The major difference is that the `layout` key is not supported. Instead, we expose the `layoutSnapshot` key to plug into the multiple-layout architecture. See the [Multi-Layout guide](https://developers.openfin.co/of-docs/docs/multi-layouts) for more information on how to set it up.
|
|
@@ -146,7 +185,7 @@ Layouts in the web support the following [`LayoutOptions.settings`](https://cdn.
|
|
|
146
185
|
- `preventSplitterResize` (Default value **false**): When true the splitters will not be draggable and the layout will not resize.
|
|
147
186
|
- `showMaximiseIcon` (Default value **false**): Enables maximise button for stacks. The button maximises the current tab to fill the entire layout container.
|
|
148
187
|
|
|
149
|
-
###
|
|
188
|
+
### `<iframe>` Permissions
|
|
150
189
|
|
|
151
190
|
To enable web API usage in iframes view `componentState` includes a `permissions` field which maps to `allow` attributes in view iframes to enable web APIs. Currently the only supported values are `'clipboard-read'` and `'clipboard-sanitized-write'`.
|
|
152
191
|
|
|
@@ -184,8 +223,6 @@ const layoutSnapshot: WebLayoutSnapshot = {
|
|
|
184
223
|
};
|
|
185
224
|
```
|
|
186
225
|
|
|
187
|
-
|
|
188
|
-
|
|
189
226
|
### Example: Retrieve a layoutSnapshot from both desktop and web environments
|
|
190
227
|
|
|
191
228
|
From within your OpenFin v34+ Desktop environment, retrieve the current layoutSnapshot:
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
title: OpenFin Web Application Developer Guide
|
|
3
3
|
group: Guides
|
|
4
4
|
---
|
|
5
|
+
|
|
5
6
|
# Openfin Web Application Developer Guide
|
|
6
7
|
|
|
7
8
|
If you are a developer who is building contentful applications which use the OpenFin APIs, the default entry point of this package provides a `connect` function. This is designed to complement the type definitions found in [@openfin/core](https://www.npmjs.com/package/@openfin/core).
|
|
@@ -115,13 +116,38 @@ Note that FDC3 support in web is currently limited to context sharing on system
|
|
|
115
116
|
|
|
116
117
|
`@openfin/core-web` has been designed to support inheritance of brokerUrls and interop configurations if your content is running as a View within an OpenFin Layout. This allows content developers to develop platform-agnostic experiences and ensure that they are able to interact with other content connected to the same Web Broker.
|
|
117
118
|
|
|
119
|
+
## Capture debug logs to your own services
|
|
120
|
+
|
|
121
|
+
`@openfin/core-web` enables capturing logs via an optional `logger` connection option. It accepts an implementation of `CustomLogger`, which allows you to forward logs to your own logging infrastructure or external services.
|
|
122
|
+
|
|
123
|
+
The `CustomLogger` interface requires four methods: `debug`, `info`, `warn`, and `error`, each accepting a string message.
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
import { connect, type CustomLogger } from '@openfin/core-web';
|
|
127
|
+
|
|
128
|
+
const myLogger: CustomLogger = {
|
|
129
|
+
debug: (message: string) => {...},
|
|
130
|
+
info: (message: string) => {...},
|
|
131
|
+
warn: (message: string) => {...},
|
|
132
|
+
error: (message: string) => {...}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const fin = await connect({
|
|
136
|
+
...,
|
|
137
|
+
logger: myLogger,
|
|
138
|
+
logLevel: 'debug'
|
|
139
|
+
});
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
> **Note:** The `logger` option respects the `logLevel` setting. Only messages at or above the specified level will get propagated.
|
|
143
|
+
|
|
118
144
|
## API Reference
|
|
119
145
|
|
|
120
146
|
(Please note, this link works in your IDE and not on npmjs.com, we will update this soon.)
|
|
121
147
|
|
|
122
|
-
-
|
|
148
|
+
- [@openfin/core-web](../out/docs/@openfin/core-web/README.md)
|
|
123
149
|
|
|
124
150
|
## See Also
|
|
125
151
|
|
|
126
|
-
-
|
|
127
|
-
-
|
|
152
|
+
- [Fin API reference](https://developer.openfin.co/docs/javascript/stable)
|
|
153
|
+
- [OpenFin Container Developer guide](https://developers.openfin.co/of-docs/docs/container-overview)
|
package/out/api-client.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./main-
|
|
1
|
+
"use strict";var e=require("./main-c7ee609b.js");require("buffer/"),require("uuid"),require("events"),require("lodash/cloneDeep"),require("lodash/isEqual"),exports.connect=e.connect;
|
package/out/api-client.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ export declare type BaseConfig = {
|
|
|
10
10
|
* Log level used throughout the connection and messaging process. Defaults to 'error'.
|
|
11
11
|
*/
|
|
12
12
|
logLevel?: WebLogLevel;
|
|
13
|
+
/**
|
|
14
|
+
* Optional custom logger implementation to propagate messages to. Respects `logLevel`, if configured.
|
|
15
|
+
*/
|
|
16
|
+
logger?: CustomLogger;
|
|
13
17
|
};
|
|
14
18
|
|
|
15
19
|
export declare type BaseConnectionOptions = {
|
|
@@ -53,6 +57,13 @@ export declare const connect: (connectConfig: ConnectConfig) => Promise<OpenFin.
|
|
|
53
57
|
|
|
54
58
|
export declare type ConnectConfig = StandAloneConnectConfig | InheritModeConnectConfig;
|
|
55
59
|
|
|
60
|
+
export declare interface CustomLogger {
|
|
61
|
+
debug: (message: string) => void;
|
|
62
|
+
info: (message: string) => void;
|
|
63
|
+
warn: (message: string) => void;
|
|
64
|
+
error: (message: string) => void;
|
|
65
|
+
}
|
|
66
|
+
|
|
56
67
|
declare type GL2Types = OpenFin.LayoutEntityTypes | 'component' | 'root' | 'ground';
|
|
57
68
|
|
|
58
69
|
export declare type InheritModeConnectConfig = BaseConfig & {
|
package/out/api-client.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{k as connect}from"./main-
|
|
1
|
+
export{k as connect}from"./main-7597f01d.js";import"buffer/";import"uuid";import"events";import"lodash/cloneDeep";import"lodash/isEqual";
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
--dark-hl-7: #6A9955;
|
|
18
18
|
--light-hl-8: #098658;
|
|
19
19
|
--dark-hl-8: #B5CEA8;
|
|
20
|
-
--light-hl-9: #
|
|
21
|
-
--dark-hl-9: #
|
|
20
|
+
--light-hl-9: #267F99;
|
|
21
|
+
--dark-hl-9: #4EC9B0;
|
|
22
22
|
--light-hl-10: #800000;
|
|
23
23
|
--dark-hl-10: #808080;
|
|
24
24
|
--light-hl-11: #800000;
|
|
@@ -29,8 +29,6 @@
|
|
|
29
29
|
--dark-hl-13: #9CDCFE;
|
|
30
30
|
--light-hl-14: #0000FF;
|
|
31
31
|
--dark-hl-14: #CE9178;
|
|
32
|
-
--light-hl-15: #267F99;
|
|
33
|
-
--dark-hl-15: #4EC9B0;
|
|
34
32
|
--light-code-background: #FFFFFF;
|
|
35
33
|
--dark-code-background: #1E1E1E;
|
|
36
34
|
}
|
|
@@ -51,7 +49,6 @@
|
|
|
51
49
|
--hl-12: var(--light-hl-12);
|
|
52
50
|
--hl-13: var(--light-hl-13);
|
|
53
51
|
--hl-14: var(--light-hl-14);
|
|
54
|
-
--hl-15: var(--light-hl-15);
|
|
55
52
|
--code-background: var(--light-code-background);
|
|
56
53
|
} }
|
|
57
54
|
|
|
@@ -71,7 +68,6 @@
|
|
|
71
68
|
--hl-12: var(--dark-hl-12);
|
|
72
69
|
--hl-13: var(--dark-hl-13);
|
|
73
70
|
--hl-14: var(--dark-hl-14);
|
|
74
|
-
--hl-15: var(--dark-hl-15);
|
|
75
71
|
--code-background: var(--dark-code-background);
|
|
76
72
|
} }
|
|
77
73
|
|
|
@@ -91,7 +87,6 @@
|
|
|
91
87
|
--hl-12: var(--light-hl-12);
|
|
92
88
|
--hl-13: var(--light-hl-13);
|
|
93
89
|
--hl-14: var(--light-hl-14);
|
|
94
|
-
--hl-15: var(--light-hl-15);
|
|
95
90
|
--code-background: var(--light-code-background);
|
|
96
91
|
}
|
|
97
92
|
|
|
@@ -111,7 +106,6 @@
|
|
|
111
106
|
--hl-12: var(--dark-hl-12);
|
|
112
107
|
--hl-13: var(--dark-hl-13);
|
|
113
108
|
--hl-14: var(--dark-hl-14);
|
|
114
|
-
--hl-15: var(--dark-hl-15);
|
|
115
109
|
--code-background: var(--dark-code-background);
|
|
116
110
|
}
|
|
117
111
|
|
|
@@ -130,5 +124,4 @@
|
|
|
130
124
|
.hl-12 { color: var(--hl-12); }
|
|
131
125
|
.hl-13 { color: var(--hl-13); }
|
|
132
126
|
.hl-14 { color: var(--hl-14); }
|
|
133
|
-
.hl-15 { color: var(--hl-15); }
|
|
134
127
|
pre, code { background: var(--code-background); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.navigationData = "data:application/octet-stream;base64,
|
|
1
|
+
window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA52VXU/bMBSG/0rl65ayMrquV4OiISQQk5DWC4QsJz5pDMk5luPQoYn/PoWkzUfTxUaRcnWe9/GxnZPHv8zCH8uW7F4D/lQ4WkMwutA6UaGwinB0Ba+QkAYzus6VBDZmWtiYLZmkME8BbTatUL6GgDdQvkf5B3oS2zRhY/aiULLl4myxmJ8u3sf7FfxKhI3IpC7KXa2v4wdpwEjhNCQDky0EdXhKMk8gm/KqhBclfAtBO3M2ZmGsEmkA2fJxH7zKM0vpLW02YOpMhRZMJMLe2CbScZzPG2u+FBmsCCO1qYPtm+7NrGs7iaffv305nx2mIoTFWd3r4p05C9rYkKsCXJtolQ9l32AMRtk7kuCpOUYOGR+sQHmREPoKj4BDvt8KtitKNSGgs6sHGvKsIVgZEBZuxRvl1vlK9HMOtrJ+v0onU4dxttyg8urogHI23QkUrSEwaKkIZ4N/H7497Marv6lDOhsfUOgsJp9LsEOGHGH5sdXJUY4f06svvSpuZ86/NuJUZEQKk8DQS/OUj/4+eAnwEnD7mXjP5Y7Ee0IrVG4b1BEV3H/2ysBzOeaq1WSfcRyEHAifGsosFgbkZEvG8XhKgJeA0/FIiESeNPbrVRglApf4Cm1rzmbvT8XzDwDqc3GNCQAA"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.searchData = "data:application/octet-stream;base64,
|
|
1
|
+
window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA82b32/bNhDH/5WCfVUV80jJsp/WddhQoEUHbGsejMCQbTrVakuGJMctgvzvAyVKOopUQjnO2pfZ9Xhf3h0/xx8Sc0/y7FSQ+eKefE3SDZlHLIrCSeSRNN4LMid/7uJym+X7V7+JO7HLDiJ/9ccx2QjikWO+I3OyydbHvUjL4qppumybLqum/pdyvyMeWe/iohAFmRPy4A319+kg0t+T9NW1WL16ezjsknVcJlnq0L2yXF6L1RJZjvIGWj9+yQ4i3Sbp1TrLxZuTWLU97rPNcSeKq6VqsZQtliexelx5MpvSoNP/NS7EuyzdJretcPn9YJXtmlp68MghzkVaWl3uug+DgIVt58ul7Gtsx69bM8f+kQByhU6At54cFDNn+uIj+/FO+SqgAd922e0Hyc65viH7l/DtVuTP8Ky2voRfA2SnYi3L79NB/rdw9VS3+jG8W3w4G/1eFgZGc5VnX0X+T+6M2rCLPtZ6lrNPEFgme5Edywt43Cm9pL9JWoo8O4ybcx/xuq93Yd/7VfVXGaebt7ssbYwdAxmwO7+y+o69T7+IPCk/ZpuRng0ZXs61cf5cyImwQ25dK7Y9b49pNei23lXbZwQ/vHW5SrZ5vBdv6qnh6Y3Msm6/rNs/uq1B0ebi3zp9Cu3CJe5eV4bGyHz0In0SDfcFqufoc5eqQUfPWbicfBu9hOkumqpDE23xJc7F5jrL3Za0Mc77pvaFgrnQVnBUMOP3h8+PwmHTODaGUTvJZ0Ygvh1EnsjzXnzZsegJv1g0L13eWiCq+zf04hHp+RoYrHWeFcXf8erl4/NRVy8YqGU48f4ycVrpe9FKs4stco9sAeqZ882pmjodtgB1+2Xd/tEtAOu63YhtfNx1abiL8yReuXSgLMdmQo8KZSLoiuzdsSiz/Qd97qt279t4bd8JIovzN2RaLWzE6nh7Zu+vG2PXI4YWsePcc45L/uhTsSZUhzV4XNtm5zqnbH+idEmPmtmKn5uvKqyBdJ3iPD3XOWX7E6VLetSkKzw3XVVYQ/uIPM/OnQxeN8Y/UcIql5qMwbkZqwMbPjRdi9WH+Ht2LN9l+0OWSs2nDtWmyeWO958TcWplHQ/5FpvLOdQG6/rQs2/wAq78lcaH4ks2YqQai//54au9//EPXs3Ih05DVasRg2RzzO9Uznbw6Yd/rcn7NBkPFzK6KGDvchGXYjTxFrMX4L55GTk6Wz3DH1UFNjeeUQz9dDxaE+PnjEe89Q3N5zo/ol4+xmns8p6sbzB61G88kqQb8Y3M78mdyIskS8mcgM/8GfHINhG7jXzLXjvokXW239fLZ/P+mtyoZp/Fusxy2bhufTUh3mLi0cifhcyjzRdQX25uvEUjVzWtfmhUu18qKUq8BfUo8xmfSYX6C/No4Aez0OPNL4H6RROnhjjVxIF4C+4B9ycUvNAD6rNAEwBDADQBRrzF1GORD0wPixmGTDPkxFtEHp36EFDNkBuGXDMMqtQy8KeguxoYhoFmGBJvMbMZhoZhqBlO5QhYu5wallPNMpKW1JaeyLCMNMvZUHpmhuFMx0XSQ8HWJzVRoz3WKtiY1diCks4SlWRQbjU2MaI6R1TSQQOrsYkS1VmikhAaWo1NnKjOE5WUUCvD1ESK6kxRSQqNrMYmVlTnikpYQo+GfhRSj848AJ8GgQcT9U3XM2GjOm1UIgRW3KjJG9WBoxIjsHNjMkd16GAyhCuYzIHOHEiKwMocmMxBb/6CoaIGy8ylIwdssK7BRA505EBCBFbYwUQOdOQgGEyXSRzoxIFkCKyFAiZxoBMHEhiwFgqYeIGOF0QYV5i2uEY2XMEkDnTioCJuZnXGJA504piEiE2sK4+JHNORYxIiZi0UZiLHdOQYDA0eM5FjvdVSQsSsRcYsC6aOHBtcMplJHNOJYxIiZi0yZiLHdORYONixSRzTiWOSIWatE2YSx3TiWDTYsUkX0+likhdmrRNm0sV0unhFl7VOuEkX1+niFV3WBYWbdHGdLi6BYdYFhZt4cR0vzgY3VSZdvLcfk8AwazVyy5ZMx4tLYLi1GrmJF9fx4pIYbq1GbvLFdb64JIZbK4qbfHGdLz7IFzf54jpfXBLDrRXFTb64zlcgieHWqghMvtRP1XHlTuSl2Lyvjy2LRXtEvSdLdZZpr+XeE07m9w8emdUfMFGfQf3JQH2qZixUn1H9yZn6rP790B2Aql/bM5D8f9LduLu+i90JOneok84qLsRaPRjsZKadDBsjo14QZs0ThU6R0k7SLcLmKk6nARMU3XSEiDzZYl8A6UycdNp7SkgFDT0Nx6iY+aYo4TQYo2XPNuAIZ2568v1wKd8PIxmEEziGWD0tb+48dFIMjR1zy7l6p4c0EEPMDe/2dSsKaoaCcsvNprkfr41ZJ6NK3c0l9W4EhcVRWG5Y63cxUGxICriT1G39twJI48y46leKKCwkxNxmkaS+77jPNmK4VEKEtluI9b0DFCGSALeEq6usFndQxik4abXPw1GuEJPcLSil0j4z7MQ4Q2JugJv1SlG9TtVK5jaIu+x2V9/Z6tRQeGrZA7dcqceIWq7GLnH4USQWwhQo0JtI3Vao7i8rOtGJUT1u03l9rXONr4YiYNFcQ918q6991Lc+essfoAyCWwoLeUU6llekh+sSbz3cSGlvtSMVPLpuvt0l4rRu3leafjE0zNxt4anf9iMJ5BRzG87qr6FQSfaY9Ygb/t1VJi1Js9H7oO4mkEYC2nY4Mn8Sq3X1dqqefyx7D45g5W6bhpNY1XLr7q05Sj8ii7nNZ62gnPptPqIy5c4jWkvumxcmSA6Nb+DIWCNn8Y6hYeFuRdDKNXOSLWi0IHNnbIbXGYbPPo48q7t1CMFoHII3HjkkB7FLUkHmi5uHh/8A72x79p85AAA=";
|
|
@@ -32,6 +32,14 @@
|
|
|
32
32
|
|
|
33
33
|
<p>Note that FDC3 support in web is currently limited to context sharing on system channels.</p>
|
|
34
34
|
<a id="md:context-aware-connections-and-connection-inheritance" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Context Aware Connections and Connection Inheritance<a href="#md:context-aware-connections-and-connection-inheritance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p><code>@openfin/core-web</code> has been designed to support inheritance of brokerUrls and interop configurations if your content is running as a View within an OpenFin Layout. This allows content developers to develop platform-agnostic experiences and ensure that they are able to interact with other content connected to the same Web Broker.</p>
|
|
35
|
+
<a id="md:capture-debug-logs-to-your-own-services" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Capture debug logs to your own services<a href="#md:capture-debug-logs-to-your-own-services" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p><code>@openfin/core-web</code> enables capturing logs via an optional <code>logger</code> connection option. It accepts an implementation of <code>CustomLogger</code>, which allows you to forward logs to your own logging infrastructure or external services.</p>
|
|
36
|
+
<p>The <code>CustomLogger</code> interface requires four methods: <code>debug</code>, <code>info</code>, <code>warn</code>, and <code>error</code>, each accepting a string message.</p>
|
|
37
|
+
<pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">connect</span><span class="hl-1">, </span><span class="hl-4">type</span><span class="hl-1"> </span><span class="hl-5">CustomLogger</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@openfin/core-web'</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">myLogger</span><span class="hl-1">: </span><span class="hl-9">CustomLogger</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-0">debug</span><span class="hl-5">:</span><span class="hl-1"> (</span><span class="hl-5">message</span><span class="hl-1">: </span><span class="hl-9">string</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> {...},</span><br/><span class="hl-1"> </span><span class="hl-0">info</span><span class="hl-5">:</span><span class="hl-1"> (</span><span class="hl-5">message</span><span class="hl-1">: </span><span class="hl-9">string</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> {...},</span><br/><span class="hl-1"> </span><span class="hl-0">warn</span><span class="hl-5">:</span><span class="hl-1"> (</span><span class="hl-5">message</span><span class="hl-1">: </span><span class="hl-9">string</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> {...},</span><br/><span class="hl-1"> </span><span class="hl-0">error</span><span class="hl-5">:</span><span class="hl-1"> (</span><span class="hl-5">message</span><span class="hl-1">: </span><span class="hl-9">string</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> {...}</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">fin</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">connect</span><span class="hl-1">({</span><br/><span class="hl-1"> ...,</span><br/><span class="hl-1"> </span><span class="hl-5">logger:</span><span class="hl-1"> </span><span class="hl-5">myLogger</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">logLevel:</span><span class="hl-1"> </span><span class="hl-2">'debug'</span><br/><span class="hl-1">});</span>
|
|
38
|
+
</code><button type="button">Copy</button></pre>
|
|
39
|
+
|
|
40
|
+
<blockquote>
|
|
41
|
+
<p><strong>Note:</strong> The <code>logger</code> option respects the <code>logLevel</code> setting. Only messages at or above the specified level will get propagated.</p>
|
|
42
|
+
</blockquote>
|
|
35
43
|
<a id="md:api-reference" class="tsd-anchor"></a><h2 class="tsd-anchor-link">API Reference<a href="#md:api-reference" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>(Please note, this link works in your IDE and not on <a href="http://npmjs.com">npmjs.com</a>, we will update this soon.)</p>
|
|
36
44
|
<ul>
|
|
37
45
|
<li><a href="../out/docs/@openfin/core-web/README.md">@openfin/core-web</a></li>
|
|
@@ -40,4 +48,4 @@
|
|
|
40
48
|
<li><a href="https://developer.openfin.co/docs/javascript/stable">Fin API reference</a></li>
|
|
41
49
|
<li><a href="https://developers.openfin.co/of-docs/docs/container-overview">OpenFin Container Developer guide</a></li>
|
|
42
50
|
</ul>
|
|
43
|
-
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><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>External</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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:openfin-web-application-developer-guide"><span>Openfin <wbr/>Web <wbr/>Application <wbr/>Developer <wbr/>Guide</span></a><ul><li><a href="#md:first-steps"><span>First <wbr/>Steps</span></a></li><li><a href="#md:connecting-to-a-web-broker"><span>Connecting to a <wbr/>Web <wbr/>Broker</span></a></li><li><ul><li><a href="#md:example-basic-connection-setup"><span>Example: <wbr/>Basic <wbr/>Connection <wbr/>Setup</span></a></li></ul></li><li><a href="#md:setting-a-timeout"><span>Setting a <wbr/>Timeout</span></a></li><li><ul><li><a href="#md:example-setting-a-timeout"><span>Example: <wbr/>Setting a <wbr/>Timeout</span></a></li></ul></li><li><a href="#md:setting-up-an-interop-connection"><span>Setting up an <wbr/>Interop <wbr/>Connection</span></a></li><li><ul><li><a href="#md:example-connecting-to-an-interop-broker"><span>Example: <wbr/>Connecting to an <wbr/>Interop <wbr/>Broker</span></a></li></ul></li><li><a href="#md:specifying-an-initial-context-group"><span>Specifying an <wbr/>Initial <wbr/>Context <wbr/>Group</span></a></li><li><ul><li><a href="#md:example-joining-a-default-context-group"><span>Example: <wbr/>Joining a <wbr/>Default <wbr/>Context <wbr/>Group</span></a></li></ul></li><li><a href="#md:initializing-fdc3"><span>Initializing FDC3</span></a></li><li><ul><li><a href="#md:example-creating-an-fdc3-client"><span>Example: <wbr/>Creating an FDC3 <wbr/>Client</span></a></li></ul></li><li><a href="#md:context-aware-connections-and-connection-inheritance"><span>Context <wbr/>Aware <wbr/>Connections and <wbr/>Connection <wbr/>Inheritance</span></a></li><li><a href="#md:api-reference"><span>API <wbr/>Reference</span></a></li><li><a href="#md:see-also"><span>See <wbr/>Also</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@openfin/core-web</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|
|
51
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><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>External</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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:openfin-web-application-developer-guide"><span>Openfin <wbr/>Web <wbr/>Application <wbr/>Developer <wbr/>Guide</span></a><ul><li><a href="#md:first-steps"><span>First <wbr/>Steps</span></a></li><li><a href="#md:connecting-to-a-web-broker"><span>Connecting to a <wbr/>Web <wbr/>Broker</span></a></li><li><ul><li><a href="#md:example-basic-connection-setup"><span>Example: <wbr/>Basic <wbr/>Connection <wbr/>Setup</span></a></li></ul></li><li><a href="#md:setting-a-timeout"><span>Setting a <wbr/>Timeout</span></a></li><li><ul><li><a href="#md:example-setting-a-timeout"><span>Example: <wbr/>Setting a <wbr/>Timeout</span></a></li></ul></li><li><a href="#md:setting-up-an-interop-connection"><span>Setting up an <wbr/>Interop <wbr/>Connection</span></a></li><li><ul><li><a href="#md:example-connecting-to-an-interop-broker"><span>Example: <wbr/>Connecting to an <wbr/>Interop <wbr/>Broker</span></a></li></ul></li><li><a href="#md:specifying-an-initial-context-group"><span>Specifying an <wbr/>Initial <wbr/>Context <wbr/>Group</span></a></li><li><ul><li><a href="#md:example-joining-a-default-context-group"><span>Example: <wbr/>Joining a <wbr/>Default <wbr/>Context <wbr/>Group</span></a></li></ul></li><li><a href="#md:initializing-fdc3"><span>Initializing FDC3</span></a></li><li><ul><li><a href="#md:example-creating-an-fdc3-client"><span>Example: <wbr/>Creating an FDC3 <wbr/>Client</span></a></li></ul></li><li><a href="#md:context-aware-connections-and-connection-inheritance"><span>Context <wbr/>Aware <wbr/>Connections and <wbr/>Connection <wbr/>Inheritance</span></a></li><li><a href="#md:capture-debug-logs-to-your-own-services"><span>Capture debug logs to your own services</span></a></li><li><a href="#md:api-reference"><span>API <wbr/>Reference</span></a></li><li><a href="#md:see-also"><span>See <wbr/>Also</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@openfin/core-web</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</li>
|
|
17
17
|
<li>
|
|
18
18
|
<p>That page must call <code>init</code> from <code>@openfin/core-web/iframe-broker</code> with the URL of the shared worker hosted in step 1.</p>
|
|
19
|
-
<pre><code class="typescript"><span class="hl-7">// Runs on https://www.example.com/web-broker</span><br/><span class="hl-4">import</span><span class="hl-1"> {</span><span class="hl-5">init</span><span class="hl-1">} </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@openfin/core-web/iframe-broker
|
|
19
|
+
<pre><code class="typescript"><span class="hl-7">// Runs on https://www.example.com/web-broker</span><br/><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">init</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@openfin/core-web/iframe-broker'</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">sharedWorkerUrl</span><span class="hl-1"> = </span><span class="hl-2">'https://www.example.com/mysharedworker.js'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">init</span><span class="hl-1">({ </span><span class="hl-5">sharedWorkerUrl</span><span class="hl-1"> });</span>
|
|
20
20
|
</code><button type="button">Copy</button></pre>
|
|
21
21
|
|
|
22
22
|
</li>
|
|
@@ -44,6 +44,18 @@
|
|
|
44
44
|
<pre><code class="typescript"><span class="hl-0">init</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">sharedWorkerUrl:</span><span class="hl-1"> </span><span class="hl-2">`</span><span class="hl-3">${</span><span class="hl-5">location</span><span class="hl-12">.</span><span class="hl-5">origin</span><span class="hl-3">}</span><span class="hl-2">/openfin-shared-worker.js`</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">logLevel:</span><span class="hl-1"> </span><span class="hl-2">'debug'</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">fin</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">connect</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">connectionInheritance:</span><span class="hl-1"> </span><span class="hl-2">'enabled'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">options:</span><span class="hl-1"> { </span><span class="hl-5">brokerUrl</span><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-5">platform:</span><span class="hl-1"> { </span><span class="hl-5">layoutSnapshot</span><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-5">logLevel:</span><span class="hl-1"> </span><span class="hl-2">'debug'</span><br/><span class="hl-1">});</span>
|
|
45
45
|
</code><button type="button">Copy</button></pre>
|
|
46
46
|
|
|
47
|
+
<a id="md:example-capture-debug-logs-to-your-own-services" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Example: Capture debug logs to your own services<a href="#md:example-capture-debug-logs-to-your-own-services" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p><code>@openfin/core-web</code> enables capturing logs via an optional <code>logger</code> connection option. It accepts an implementation of <code>CustomLogger</code>, which allows you to forward logs to your own logging infrastructure or external services.</p>
|
|
48
|
+
<p>The <code>CustomLogger</code> interface requires four methods: <code>debug</code>, <code>info</code>, <code>warn</code>, and <code>error</code>, each accepting a string message.</p>
|
|
49
|
+
<pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">connect</span><span class="hl-1">, </span><span class="hl-4">type</span><span class="hl-1"> </span><span class="hl-5">CustomLogger</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@openfin/core-web'</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">myLogger</span><span class="hl-1">: </span><span class="hl-9">CustomLogger</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-0">debug</span><span class="hl-5">:</span><span class="hl-1"> (</span><span class="hl-5">message</span><span class="hl-1">: </span><span class="hl-9">string</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> {...},</span><br/><span class="hl-1"> </span><span class="hl-0">info</span><span class="hl-5">:</span><span class="hl-1"> (</span><span class="hl-5">message</span><span class="hl-1">: </span><span class="hl-9">string</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> {...},</span><br/><span class="hl-1"> </span><span class="hl-0">warn</span><span class="hl-5">:</span><span class="hl-1"> (</span><span class="hl-5">message</span><span class="hl-1">: </span><span class="hl-9">string</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> {...},</span><br/><span class="hl-1"> </span><span class="hl-0">error</span><span class="hl-5">:</span><span class="hl-1"> (</span><span class="hl-5">message</span><span class="hl-1">: </span><span class="hl-9">string</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> {...}</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">fin</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">connect</span><span class="hl-1">({</span><br/><span class="hl-1"> ...,</span><br/><span class="hl-1"> </span><span class="hl-5">logger:</span><span class="hl-1"> </span><span class="hl-5">myLogger</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">logLevel:</span><span class="hl-1"> </span><span class="hl-2">'debug'</span><br/><span class="hl-1">});</span>
|
|
50
|
+
</code><button type="button">Copy</button></pre>
|
|
51
|
+
|
|
52
|
+
<blockquote>
|
|
53
|
+
<p><strong>Note:</strong> The <code>logger</code> option respects the <code>logLevel</code> setting. Only messages at or above the specified level will get propagated.</p>
|
|
54
|
+
</blockquote>
|
|
55
|
+
<p>Similar functionality exists for setting up a web broker:</p>
|
|
56
|
+
<pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">init</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@openfin/core-web/iframe-broker'</span><span class="hl-1">;</span><br/><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-4">type</span><span class="hl-1"> </span><span class="hl-5">CustomLogger</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@openfin/core-web'</span><span class="hl-1">;</span><br/><br/><span class="hl-0">init</span><span class="hl-1">({</span><br/><span class="hl-1"> ...,</span><br/><span class="hl-1"> </span><span class="hl-5">logger:</span><span class="hl-1"> </span><span class="hl-5">myLogger</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">logLevel:</span><span class="hl-1"> </span><span class="hl-2">'debug'</span><br/><span class="hl-1">});</span>
|
|
57
|
+
</code><button type="button">Copy</button></pre>
|
|
58
|
+
|
|
47
59
|
<a id="md:create-layouts" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Create Layouts<a href="#md:create-layouts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Layouts in the web are very similar to the desktop OpenFin environment. They consist of a layout configuration that describes the rows/columns/view components. The major difference is that the <code>layout</code> key is not supported. Instead, we expose the <code>layoutSnapshot</code> key to plug into the multiple-layout architecture. See the <a href="https://developers.openfin.co/of-docs/docs/multi-layouts">Multi-Layout guide</a> for more information on how to set it up.</p>
|
|
48
60
|
<p>Note that you can achieve a single layout by having only 1 key in your <code>layoutSnapshot</code>:</p>
|
|
49
61
|
<pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">layoutSnapshot</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-5">layouts:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">layout:</span><span class="hl-1"> { ... }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
|
@@ -57,8 +69,8 @@
|
|
|
57
69
|
<li><code>preventSplitterResize</code> (Default value <strong>false</strong>): When true the splitters will not be draggable and the layout will not resize.</li>
|
|
58
70
|
<li><code>showMaximiseIcon</code> (Default value <strong>false</strong>): Enables maximise button for stacks. The button maximises the current tab to fill the entire layout container.</li>
|
|
59
71
|
</ul>
|
|
60
|
-
<a id="md:-permissions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><iframe> Permissions<a href="#md:-permissions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>To enable web API usage in iframes view <code>componentState</code> includes a <code>permissions</code> field which maps to <code>allow</code> attributes in view iframes to enable web APIs. Currently the only supported values are <code>'clipboard-read'</code> and <code>'clipboard-sanitized-write'</code>.</p>
|
|
61
|
-
<a id="md:example-snapshot-with-clipboard-permissions-enabled" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Example: Snapshot with Clipboard Permissions Enabled<a href="#md:example-snapshot-with-clipboard-permissions-enabled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">layoutSnapshot</span><span class="hl-1">: </span><span class="hl-
|
|
72
|
+
<a id="md:-permissions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code><iframe></code> Permissions<a href="#md:-permissions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>To enable web API usage in iframes view <code>componentState</code> includes a <code>permissions</code> field which maps to <code>allow</code> attributes in view iframes to enable web APIs. Currently the only supported values are <code>'clipboard-read'</code> and <code>'clipboard-sanitized-write'</code>.</p>
|
|
73
|
+
<a id="md:example-snapshot-with-clipboard-permissions-enabled" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Example: Snapshot with Clipboard Permissions Enabled<a href="#md:example-snapshot-with-clipboard-permissions-enabled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">layoutSnapshot</span><span class="hl-1">: </span><span class="hl-9">WebLayoutSnapshot</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-5">layouts:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">tab1:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'row'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'stack'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">title:</span><span class="hl-1"> </span><span class="hl-2">'Example'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'component'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">componentName:</span><span class="hl-1"> </span><span class="hl-2">'view'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">componentState:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">url:</span><span class="hl-1"> </span><span class="hl-2">'http://example.com/'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">permissions:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">webAPIs:</span><span class="hl-1"> [</span><span class="hl-2">'clipboard-read'</span><span class="hl-1">, </span><span class="hl-2">'clipboard-sanitized-write'</span><span class="hl-1">]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">};</span>
|
|
62
74
|
</code><button type="button">Copy</button></pre>
|
|
63
75
|
|
|
64
76
|
<a id="md:example-retrieve-a-layoutsnapshot-from-both-desktop-and-web-environments" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Example: Retrieve a layoutSnapshot from both desktop and web environments<a href="#md:example-retrieve-a-layoutsnapshot-from-both-desktop-and-web-environments" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>From within your OpenFin v34+ Desktop environment, retrieve the current layoutSnapshot:</p>
|
|
@@ -67,7 +79,7 @@
|
|
|
67
79
|
|
|
68
80
|
<p>Note that the <code>fin.Platform.Layout</code> API is exactly the same in web, so you can retrieve the Web Layout Snapshot using the same code.</p>
|
|
69
81
|
<a id="md:example-create-a-layoutsnapshot-with-2-layouts-and-initialize-it-via-connect-call" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Example: Create a layoutSnapshot with 2 layouts and initialize it via connect call<a href="#md:example-create-a-layoutsnapshot-with-2-layouts-and-initialize-it-via-connect-call" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>In order to use layouts, specify the <code>platform</code> option to the <code>connect</code> call and pass in the <code>layoutSnapshot</code>.</p>
|
|
70
|
-
<pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">connect</span><span class="hl-1">, </span><span class="hl-4">type</span><span class="hl-1"> </span><span class="hl-5">WebLayoutSnapshot</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@openfin/core-web'</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">brokerUrl</span><span class="hl-1"> = </span><span class="hl-2">'http://example.com/web-broker'</span><span class="hl-1">;</span><br/><br/><span class="hl-7">// Presumably retrieved from fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot()</span><br/><span class="hl-7">// in a v34+ Desktop environment, but also can be manually constructed like this:</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">layoutSnapshot</span><span class="hl-1">: </span><span class="hl-
|
|
82
|
+
<pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">connect</span><span class="hl-1">, </span><span class="hl-4">type</span><span class="hl-1"> </span><span class="hl-5">WebLayoutSnapshot</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">'@openfin/core-web'</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">brokerUrl</span><span class="hl-1"> = </span><span class="hl-2">'http://example.com/web-broker'</span><span class="hl-1">;</span><br/><br/><span class="hl-7">// Presumably retrieved from fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot()</span><br/><span class="hl-7">// in a v34+ Desktop environment, but also can be manually constructed like this:</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">layoutSnapshot</span><span class="hl-1">: </span><span class="hl-9">WebLayoutSnapshot</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-5">layouts:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">tab1:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'row'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'stack'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">title:</span><span class="hl-1"> </span><span class="hl-2">'Example'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'component'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">componentName:</span><span class="hl-1"> </span><span class="hl-2">'view'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">componentState:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">url:</span><span class="hl-1"> </span><span class="hl-2">'http://example.com/'</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'stack'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">title:</span><span class="hl-1"> </span><span class="hl-2">'Example'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'component'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">componentName:</span><span class="hl-1"> </span><span class="hl-2">'view'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">componentState:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">url:</span><span class="hl-1"> </span><span class="hl-2">'http://example.com/'</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-5">tab2:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'stack'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">title:</span><span class="hl-1"> </span><span class="hl-2">'Example'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'component'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">componentName:</span><span class="hl-1"> </span><span class="hl-2">'view'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">componentState:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">url:</span><span class="hl-1"> </span><span class="hl-2">'http://example.com/'</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-1">(</span><span class="hl-3">async</span><span class="hl-1"> () </span><span class="hl-3">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">// Connect to the OpenFin Web Broker. Pass in the `platform` key with a layoutSnapshot.</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">fin</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">connect</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">connectionInheritance:</span><span class="hl-1"> </span><span class="hl-2">'enabled'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">options:</span><span class="hl-1"> { </span><span class="hl-5">brokerUrl</span><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-5">platform:</span><span class="hl-1"> { </span><span class="hl-5">layoutSnapshot</span><span class="hl-1"> }</span><br/><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">container</span><span class="hl-1"> = </span><span class="hl-5">document</span><span class="hl-1">.</span><span class="hl-0">getElementById</span><span class="hl-1">(</span><span class="hl-2">'layout-container'</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-7">// You may now use the `fin` object. In this case, we want to initialize and create layouts.</span><br/><span class="hl-1"> </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-5">fin</span><span class="hl-1">.</span><span class="hl-5">Platform</span><span class="hl-1">.</span><span class="hl-5">Layout</span><span class="hl-1">.</span><span class="hl-0">init</span><span class="hl-1">({ </span><span class="hl-5">container</span><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-7">// For multi-layout information see https://developers.openfin.co/of-docs/docs/multi-layouts</span><br/><span class="hl-1"> </span><span class="hl-7">// In the multi-layout case we would also call `fin.Platform.Layout.create()`.</span><br/><span class="hl-1">})();</span>
|
|
71
83
|
</code><button type="button">Copy</button></pre>
|
|
72
84
|
|
|
73
85
|
<p>Note that cross-tab support is experimental, browser-dependent and respects each browser's privacy sandbox.</p>
|
|
@@ -81,4 +93,4 @@
|
|
|
81
93
|
<li><a href="https://developers.openfin.co/of-docs/docs/container-overview">OpenFin Container Developer guide</a></li>
|
|
82
94
|
<li><a href="https://developer.openfin.co/docs/javascript/stable">Fin API reference</a></li>
|
|
83
95
|
</ul>
|
|
84
|
-
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><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>External</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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:platform-developer-guide"><span>Platform <wbr/>Developer <wbr/>Guide</span></a><ul><li><a href="#md:first-steps"><span>First <wbr/>Steps</span></a></li><li><ul><li><a href="#md:host-the-openfincore-web-shared-worker"><span>Host the @openfin/core-<wbr/>web <wbr/>Shared <wbr/>Worker</span></a></li></ul></li><li><a href="#md:build-a-web-broker"><span>Build a <wbr/>Web <wbr/>Broker</span></a></li><li><ul><li><a href="#md:example-set-up-a-basic-web-broker"><span>Example: <wbr/>Set up a <wbr/>Basic <wbr/>Web <wbr/>Broker</span></a></li></ul></li><li><a href="#md:reject-connections"><span>Reject <wbr/>Connections</span></a></li><li><ul><li><a href="#md:example-reject-a-cross-origin-connection-using-openfincore-webiframe-broker"><span>Example: <wbr/>Reject a <wbr/>Cross <wbr/>Origin <wbr/>Connection using @openfin/core-<wbr/>web/iframe-<wbr/>broker</span></a></li></ul></li><li><a href="#md:experimental-enable-cross-tab-support"><span>Experimental: <wbr/>Enable <wbr/>Cross <wbr/>Tab <wbr/>Support</span></a></li><li><ul><li><a href="#md:example-enable-cross-tab-support"><span>Example: <wbr/>Enable <wbr/>Cross <wbr/>Tab <wbr/>Support</span></a></li><li><a href="#md:example-enable-loglevel-for-debugging"><span>Example: <wbr/>Enable log<wbr/>Level for <wbr/>Debugging</span></a></li></ul></li><li><a href="#md:create-layouts"><span>Create <wbr/>Layouts</span></a></li><li><ul><li><a href="#md:layout-settings"><span>Layout <wbr/>Settings</span></a></li><li><a href="#md:-permissions"><span><iframe> <wbr/>Permissions</span></a></li><li><ul><li><a href="#md:example-snapshot-with-clipboard-permissions-enabled"><span>Example: <wbr/>Snapshot with <wbr/>Clipboard <wbr/>Permissions <wbr/>Enabled</span></a></li></ul></li><li><a href="#md:example-retrieve-a-layoutsnapshot-from-both-desktop-and-web-environments"><span>Example: <wbr/>Retrieve a layout<wbr/>Snapshot from both desktop and web environments</span></a></li><li><a href="#md:example-create-a-layoutsnapshot-with-2-layouts-and-initialize-it-via-connect-call"><span>Example: <wbr/>Create a layout<wbr/>Snapshot with 2 layouts and initialize it via connect call</span></a></li></ul></li><li><a href="#md:api-reference"><span>API <wbr/>Reference</span></a></li><li><a href="#md:see-also"><span>See <wbr/>Also</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@openfin/core-web</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|
|
96
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><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>External</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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:platform-developer-guide"><span>Platform <wbr/>Developer <wbr/>Guide</span></a><ul><li><a href="#md:first-steps"><span>First <wbr/>Steps</span></a></li><li><ul><li><a href="#md:host-the-openfincore-web-shared-worker"><span>Host the @openfin/core-<wbr/>web <wbr/>Shared <wbr/>Worker</span></a></li></ul></li><li><a href="#md:build-a-web-broker"><span>Build a <wbr/>Web <wbr/>Broker</span></a></li><li><ul><li><a href="#md:example-set-up-a-basic-web-broker"><span>Example: <wbr/>Set up a <wbr/>Basic <wbr/>Web <wbr/>Broker</span></a></li></ul></li><li><a href="#md:reject-connections"><span>Reject <wbr/>Connections</span></a></li><li><ul><li><a href="#md:example-reject-a-cross-origin-connection-using-openfincore-webiframe-broker"><span>Example: <wbr/>Reject a <wbr/>Cross <wbr/>Origin <wbr/>Connection using @openfin/core-<wbr/>web/iframe-<wbr/>broker</span></a></li></ul></li><li><a href="#md:experimental-enable-cross-tab-support"><span>Experimental: <wbr/>Enable <wbr/>Cross <wbr/>Tab <wbr/>Support</span></a></li><li><ul><li><a href="#md:example-enable-cross-tab-support"><span>Example: <wbr/>Enable <wbr/>Cross <wbr/>Tab <wbr/>Support</span></a></li><li><a href="#md:example-enable-loglevel-for-debugging"><span>Example: <wbr/>Enable log<wbr/>Level for <wbr/>Debugging</span></a></li><li><a href="#md:example-capture-debug-logs-to-your-own-services"><span>Example: <wbr/>Capture debug logs to your own services</span></a></li></ul></li><li><a href="#md:create-layouts"><span>Create <wbr/>Layouts</span></a></li><li><ul><li><a href="#md:layout-settings"><span>Layout <wbr/>Settings</span></a></li><li><a href="#md:-permissions"><span><iframe> <wbr/>Permissions</span></a></li><li><ul><li><a href="#md:example-snapshot-with-clipboard-permissions-enabled"><span>Example: <wbr/>Snapshot with <wbr/>Clipboard <wbr/>Permissions <wbr/>Enabled</span></a></li></ul></li><li><a href="#md:example-retrieve-a-layoutsnapshot-from-both-desktop-and-web-environments"><span>Example: <wbr/>Retrieve a layout<wbr/>Snapshot from both desktop and web environments</span></a></li><li><a href="#md:example-create-a-layoutsnapshot-with-2-layouts-and-initialize-it-via-connect-call"><span>Example: <wbr/>Create a layout<wbr/>Snapshot with 2 layouts and initialize it via connect call</span></a></li></ul></li><li><a href="#md:api-reference"><span>API <wbr/>Reference</span></a></li><li><a href="#md:see-also"><span>See <wbr/>Also</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@openfin/core-web</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CustomLogger | @openfin/core-web</title><meta name="description" content="Documentation for @openfin/core-web"/><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(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@openfin/core-web</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@openfin/core-web</a></li><li><a href="../modules/_openfin_core_web.html">@openfin/core-web</a></li><li><a href="_openfin_core_web.CustomLogger.html">CustomLogger</a></li></ul><h1>Interface CustomLogger</h1></div><div class="tsd-signature"><span class="tsd-signature-keyword">interface </span><span class="tsd-kind-interface">CustomLogger</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><a class="tsd-kind-property" href="_openfin_core_web.CustomLogger.html#debug">debug</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="_openfin_core_web.CustomLogger.html#error">error</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="_openfin_core_web.CustomLogger.html#info">info</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="_openfin_core_web.CustomLogger.html#warn">warn</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="_openfin_core_web.CustomLogger.html#debug" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>debug</span></a>
|
|
2
|
+
<a href="_openfin_core_web.CustomLogger.html#error" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>error</span></a>
|
|
3
|
+
<a href="_openfin_core_web.CustomLogger.html#info" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>info</span></a>
|
|
4
|
+
<a href="_openfin_core_web.CustomLogger.html#warn" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>warn</span></a>
|
|
5
|
+
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="debug" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>debug</span><a href="#debug" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">debug</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div></section><section class="tsd-panel tsd-member"><a id="error" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>error</span><a href="#error" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div></section><section class="tsd-panel tsd-member"><a id="info" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>info</span><a href="#info" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">info</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div></section><section class="tsd-panel tsd-member"><a id="warn" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>warn</span><a href="#warn" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">warn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>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><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><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>External</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"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#debug" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>debug</span></a><a href="#error" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>error</span></a><a href="#info" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>info</span></a><a href="#warn" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>warn</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@openfin/core-web</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>
|