@openfin/core 33.76.36 → 33.77.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.
- package/OpenFin.d.ts +1 -1
- package/README.md +29 -4
- package/fin.d.ts +2 -2
- package/{src → out}/GlobalOpenFin.d.ts +1 -1
- package/out/mock-alpha.d.ts +16112 -0
- package/out/mock-beta.d.ts +16112 -0
- package/out/mock-public.d.ts +16112 -0
- package/out/mock.d.ts +16797 -0
- package/out/mock.js +17111 -0
- package/package.json +30 -23
- package/LICENSE +0 -13
- package/NOTICE +0 -16
- package/openfin-core-33.76.36.tgz +0 -0
- package/src/OpenFin.d.ts +0 -3091
- package/src/OpenFin.js +0 -2
- package/src/api/api-exposer/api-consumer.d.ts +0 -28
- package/src/api/api-exposer/api-consumer.js +0 -28
- package/src/api/api-exposer/api-exposer.d.ts +0 -35
- package/src/api/api-exposer/api-exposer.js +0 -38
- package/src/api/api-exposer/decorators.d.ts +0 -10
- package/src/api/api-exposer/decorators.js +0 -18
- package/src/api/api-exposer/index.d.ts +0 -4
- package/src/api/api-exposer/index.js +0 -20
- package/src/api/api-exposer/strategies/index.d.ts +0 -1
- package/src/api/api-exposer/strategies/index.js +0 -17
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.d.ts +0 -14
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.js +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.d.ts +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.js +0 -23
- package/src/api/api-exposer/strategies/openfin-channels/index.d.ts +0 -2
- package/src/api/api-exposer/strategies/openfin-channels/index.js +0 -18
- package/src/api/application/Factory.d.ts +0 -196
- package/src/api/application/Factory.js +0 -278
- package/src/api/application/Instance.d.ts +0 -692
- package/src/api/application/Instance.js +0 -821
- package/src/api/application/index.d.ts +0 -12
- package/src/api/application/index.js +0 -28
- package/src/api/base.d.ts +0 -117
- package/src/api/base.js +0 -246
- package/src/api/clipboard/index.d.ts +0 -172
- package/src/api/clipboard/index.js +0 -200
- package/src/api/events/application.d.ts +0 -158
- package/src/api/events/application.js +0 -14
- package/src/api/events/base.d.ts +0 -42
- package/src/api/events/base.js +0 -2
- package/src/api/events/channel.d.ts +0 -35
- package/src/api/events/channel.js +0 -7
- package/src/api/events/emitterMap.d.ts +0 -11
- package/src/api/events/emitterMap.js +0 -35
- package/src/api/events/eventAggregator.d.ts +0 -5
- package/src/api/events/eventAggregator.js +0 -35
- package/src/api/events/externalApplication.d.ts +0 -24
- package/src/api/events/externalApplication.js +0 -7
- package/src/api/events/frame.d.ts +0 -35
- package/src/api/events/frame.js +0 -2
- package/src/api/events/globalHotkey.d.ts +0 -25
- package/src/api/events/globalHotkey.js +0 -2
- package/src/api/events/platform.d.ts +0 -34
- package/src/api/events/platform.js +0 -10
- package/src/api/events/system.d.ts +0 -126
- package/src/api/events/system.js +0 -15
- package/src/api/events/typedEventEmitter.d.ts +0 -20
- package/src/api/events/typedEventEmitter.js +0 -2
- package/src/api/events/view.d.ts +0 -92
- package/src/api/events/view.js +0 -12
- package/src/api/events/webcontents.d.ts +0 -277
- package/src/api/events/webcontents.js +0 -13
- package/src/api/events/window.d.ts +0 -421
- package/src/api/events/window.js +0 -12
- package/src/api/external-application/Factory.d.ts +0 -34
- package/src/api/external-application/Factory.js +0 -47
- package/src/api/external-application/Instance.d.ts +0 -110
- package/src/api/external-application/Instance.js +0 -117
- package/src/api/external-application/index.d.ts +0 -12
- package/src/api/external-application/index.js +0 -28
- package/src/api/fin.d.ts +0 -54
- package/src/api/fin.js +0 -45
- package/src/api/frame/Factory.d.ts +0 -54
- package/src/api/frame/Factory.js +0 -86
- package/src/api/frame/Instance.d.ts +0 -136
- package/src/api/frame/Instance.js +0 -143
- package/src/api/frame/index.d.ts +0 -14
- package/src/api/frame/index.js +0 -30
- package/src/api/global-hotkey/index.d.ts +0 -106
- package/src/api/global-hotkey/index.js +0 -132
- package/src/api/interappbus/channel/channel.d.ts +0 -285
- package/src/api/interappbus/channel/channel.js +0 -334
- package/src/api/interappbus/channel/channels-docs.d.ts +0 -342
- package/src/api/interappbus/channel/channels-docs.js +0 -401
- package/src/api/interappbus/channel/client.d.ts +0 -117
- package/src/api/interappbus/channel/client.js +0 -181
- package/src/api/interappbus/channel/connection-manager.d.ts +0 -29
- package/src/api/interappbus/channel/connection-manager.js +0 -246
- package/src/api/interappbus/channel/index.d.ts +0 -189
- package/src/api/interappbus/channel/index.js +0 -333
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/classic/message-receiver.js +0 -73
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/classic/strategy.js +0 -101
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +0 -20
- package/src/api/interappbus/channel/protocols/combined/strategy.js +0 -58
- package/src/api/interappbus/channel/protocols/index.d.ts +0 -47
- package/src/api/interappbus/channel/protocols/index.js +0 -2
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +0 -10
- package/src/api/interappbus/channel/protocols/protocol-manager.js +0 -43
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +0 -25
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +0 -141
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +0 -30
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -130
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +0 -85
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/strategy-types.js +0 -2
- package/src/api/interappbus/channel/protocols/strategy.d.ts +0 -17
- package/src/api/interappbus/channel/protocols/strategy.js +0 -2
- package/src/api/interappbus/channel/provider.d.ts +0 -206
- package/src/api/interappbus/channel/provider.js +0 -338
- package/src/api/interappbus/index.d.ts +0 -120
- package/src/api/interappbus/index.js +0 -210
- package/src/api/interop/Factory.d.ts +0 -57
- package/src/api/interop/Factory.js +0 -96
- package/src/api/interop/InteropBroker.d.ts +0 -665
- package/src/api/interop/InteropBroker.js +0 -1313
- package/src/api/interop/InteropClient.d.ts +0 -502
- package/src/api/interop/InteropClient.js +0 -683
- package/src/api/interop/SessionContextGroupBroker.d.ts +0 -27
- package/src/api/interop/SessionContextGroupBroker.js +0 -108
- package/src/api/interop/SessionContextGroupClient.d.ts +0 -21
- package/src/api/interop/SessionContextGroupClient.js +0 -86
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +0 -20
- package/src/api/interop/fdc3/PrivateChannelClient.js +0 -90
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +0 -55
- package/src/api/interop/fdc3/PrivateChannelProvider.js +0 -276
- package/src/api/interop/fdc3/documentationStub.d.ts +0 -14
- package/src/api/interop/fdc3/documentationStub.js +0 -17
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +0 -205
- package/src/api/interop/fdc3/fdc3-1.2.js +0 -435
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +0 -298
- package/src/api/interop/fdc3/fdc3-2.0.js +0 -479
- package/src/api/interop/fdc3/fdc3.d.ts +0 -12
- package/src/api/interop/fdc3/fdc3.js +0 -35
- package/src/api/interop/fdc3/overrideCheck.d.ts +0 -4
- package/src/api/interop/fdc3/overrideCheck.js +0 -32
- package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +0 -53
- package/src/api/interop/fdc3/shapes/fdc3v1.js +0 -4
- package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +0 -75
- package/src/api/interop/fdc3/shapes/fdc3v2.js +0 -2
- package/src/api/interop/fdc3/utils.d.ts +0 -45
- package/src/api/interop/fdc3/utils.js +0 -239
- package/src/api/interop/fdc3/versions.d.ts +0 -1
- package/src/api/interop/fdc3/versions.js +0 -2
- package/src/api/interop/index.d.ts +0 -12
- package/src/api/interop/index.js +0 -28
- package/src/api/interop/utils.d.ts +0 -18
- package/src/api/interop/utils.js +0 -61
- package/src/api/me.d.ts +0 -40
- package/src/api/me.js +0 -134
- package/src/api/platform/Factory.d.ts +0 -171
- package/src/api/platform/Factory.js +0 -240
- package/src/api/platform/Instance.d.ts +0 -653
- package/src/api/platform/Instance.js +0 -834
- package/src/api/platform/common-utils.d.ts +0 -7
- package/src/api/platform/common-utils.js +0 -16
- package/src/api/platform/index.d.ts +0 -12
- package/src/api/platform/index.js +0 -28
- package/src/api/platform/layout/Factory.d.ts +0 -91
- package/src/api/platform/layout/Factory.js +0 -151
- package/src/api/platform/layout/Instance.d.ts +0 -192
- package/src/api/platform/layout/Instance.js +0 -224
- package/src/api/platform/layout/controllers/layout-content-cache.d.ts +0 -9
- package/src/api/platform/layout/controllers/layout-content-cache.js +0 -54
- package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +0 -119
- package/src/api/platform/layout/controllers/layout-entities-controller.js +0 -287
- package/src/api/platform/layout/entities/layout-entities.d.ts +0 -427
- package/src/api/platform/layout/entities/layout-entities.js +0 -504
- package/src/api/platform/layout/entities/shapes.d.ts +0 -6
- package/src/api/platform/layout/entities/shapes.js +0 -2
- package/src/api/platform/layout/index.d.ts +0 -11
- package/src/api/platform/layout/index.js +0 -27
- package/src/api/platform/layout/layout.constants.d.ts +0 -1
- package/src/api/platform/layout/layout.constants.js +0 -4
- package/src/api/platform/layout/shapes.d.ts +0 -16
- package/src/api/platform/layout/shapes.js +0 -2
- package/src/api/platform/layout/utils/layout-traversal.d.ts +0 -4
- package/src/api/platform/layout/utils/layout-traversal.js +0 -65
- package/src/api/platform/provider.d.ts +0 -510
- package/src/api/platform/provider.js +0 -2
- package/src/api/snapshot-source/Factory.d.ts +0 -53
- package/src/api/snapshot-source/Factory.js +0 -81
- package/src/api/snapshot-source/Instance.d.ts +0 -53
- package/src/api/snapshot-source/Instance.js +0 -154
- package/src/api/snapshot-source/index.d.ts +0 -12
- package/src/api/snapshot-source/index.js +0 -28
- package/src/api/snapshot-source/utils.d.ts +0 -2
- package/src/api/snapshot-source/utils.js +0 -6
- package/src/api/system/index.d.ts +0 -1468
- package/src/api/system/index.js +0 -1851
- package/src/api/view/Factory.d.ts +0 -88
- package/src/api/view/Factory.js +0 -141
- package/src/api/view/Instance.d.ts +0 -601
- package/src/api/view/Instance.js +0 -671
- package/src/api/view/index.d.ts +0 -12
- package/src/api/view/index.js +0 -28
- package/src/api/webcontents/main.d.ts +0 -922
- package/src/api/webcontents/main.js +0 -1046
- package/src/api/window/Factory.d.ts +0 -96
- package/src/api/window/Factory.js +0 -142
- package/src/api/window/Instance.d.ts +0 -1598
- package/src/api/window/Instance.js +0 -1851
- package/src/api/window/index.d.ts +0 -14
- package/src/api/window/index.js +0 -30
- package/src/browser.d.ts +0 -10
- package/src/browser.js +0 -36
- package/src/environment/browser.d.ts +0 -29
- package/src/environment/browser.js +0 -60
- package/src/environment/environment.d.ts +0 -33
- package/src/environment/environment.js +0 -4
- package/src/environment/mockEnvironment.d.ts +0 -27
- package/src/environment/mockEnvironment.js +0 -61
- package/src/environment/node-env.d.ts +0 -29
- package/src/environment/node-env.js +0 -72
- package/src/fdc3.d.ts +0 -3
- package/src/fdc3.js +0 -9
- package/src/mock.d.ts +0 -3
- package/src/mock.js +0 -18
- package/src/namespaces.d.ts +0 -22
- package/src/namespaces.js +0 -26
- package/src/shapes/ERROR_BOX_TYPES.d.ts +0 -1
- package/src/shapes/ERROR_BOX_TYPES.js +0 -2
- package/src/shapes/WebOptions.d.ts +0 -13
- package/src/shapes/WebOptions.js +0 -2
- package/src/shapes/WindowOptions.d.ts +0 -43
- package/src/shapes/WindowOptions.js +0 -2
- package/src/shapes/protocol.d.ts +0 -204
- package/src/shapes/protocol.js +0 -2
- package/src/transport/mockWire.d.ts +0 -11
- package/src/transport/mockWire.js +0 -26
- package/src/transport/transport-errors.d.ts +0 -31
- package/src/transport/transport-errors.js +0 -79
- package/src/transport/transport.d.ts +0 -73
- package/src/transport/transport.js +0 -219
- package/src/transport/wire.d.ts +0 -77
- package/src/transport/wire.js +0 -36
- package/src/util/asyncFilter.d.ts +0 -1
- package/src/util/asyncFilter.js +0 -7
- package/src/util/channel-api-relay.d.ts +0 -13
- package/src/util/channel-api-relay.js +0 -47
- package/src/util/errors.d.ts +0 -10
- package/src/util/errors.js +0 -12
- package/src/util/exhaustive.d.ts +0 -1
- package/src/util/exhaustive.js +0 -7
- package/src/util/http.d.ts +0 -11
- package/src/util/http.js +0 -90
- package/src/util/inaccessibleObject.d.ts +0 -2
- package/src/util/inaccessibleObject.js +0 -49
- package/src/util/lazy.d.ts +0 -34
- package/src/util/lazy.js +0 -54
- package/src/util/normalize-config.d.ts +0 -3
- package/src/util/normalize-config.js +0 -52
- package/src/util/promises.d.ts +0 -5
- package/src/util/promises.js +0 -27
- package/src/util/ref-counter.d.ts +0 -7
- package/src/util/ref-counter.js +0 -52
- package/src/util/reversible-map.d.ts +0 -11
- package/src/util/reversible-map.js +0 -49
- package/src/util/runtimeVersioning.d.ts +0 -3
- package/src/util/runtimeVersioning.js +0 -25
- package/src/util/utilTypes.d.ts +0 -8
- package/src/util/utilTypes.js +0 -2
- package/src/util/validate.d.ts +0 -3
- package/src/util/validate.js +0 -11
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExternalApplication = void 0;
|
|
4
|
-
/* eslint-disable import/prefer-default-export */
|
|
5
|
-
const base_1 = require("../base");
|
|
6
|
-
/**
|
|
7
|
-
* An ExternalApplication object representing native language adapter connections to the runtime. Allows
|
|
8
|
-
* the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
|
|
9
|
-
* Discovery of connections is provided by <a href="tutorial-System.getAllExternalApplications.html">getAllExternalApplications.</a>
|
|
10
|
-
*
|
|
11
|
-
* Processes that can be wrapped as `ExternalApplication`s include the following:
|
|
12
|
-
* - Processes which have connected to an OpenFin runtime via an adapter
|
|
13
|
-
* - Processes started via `System.launchExternalApplication`
|
|
14
|
-
* - Processes monitored via `System.monitorExternalProcess`
|
|
15
|
-
*/
|
|
16
|
-
class ExternalApplication extends base_1.EmitterBase {
|
|
17
|
-
/**
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
constructor(wire, identity) {
|
|
21
|
-
super(wire, 'external-application', identity.uuid);
|
|
22
|
-
this.identity = identity;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
|
26
|
-
* @param eventType - The type of the event.
|
|
27
|
-
* @param listener - Called whenever an event of the specified type occurs.
|
|
28
|
-
* @param options - Option to support event timestamps.
|
|
29
|
-
*
|
|
30
|
-
* @function addListener
|
|
31
|
-
* @memberof ExternalApplication
|
|
32
|
-
* @instance
|
|
33
|
-
* @tutorial ExternalApplication.EventEmitter
|
|
34
|
-
*/
|
|
35
|
-
/**
|
|
36
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
|
37
|
-
* @param eventType - The type of the event.
|
|
38
|
-
* @param listener - Called whenever an event of the specified type occurs.
|
|
39
|
-
* @param options - Option to support event timestamps.
|
|
40
|
-
*
|
|
41
|
-
* @function on
|
|
42
|
-
* @memberof ExternalApplication
|
|
43
|
-
* @instance
|
|
44
|
-
* @tutorial ExternalApplication.EventEmitter
|
|
45
|
-
*/
|
|
46
|
-
/**
|
|
47
|
-
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
48
|
-
* @param eventType - The type of the event.
|
|
49
|
-
* @param listener - The callback function.
|
|
50
|
-
* @param options - Option to support event timestamps.
|
|
51
|
-
*
|
|
52
|
-
* @function once
|
|
53
|
-
* @memberof ExternalApplication
|
|
54
|
-
* @instance
|
|
55
|
-
* @tutorial ExternalApplication.EventEmitter
|
|
56
|
-
*/
|
|
57
|
-
/**
|
|
58
|
-
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
59
|
-
* @param eventType - The type of the event.
|
|
60
|
-
* @param listener - The callback function.
|
|
61
|
-
* @param options - Option to support event timestamps.
|
|
62
|
-
*
|
|
63
|
-
* @function prependListener
|
|
64
|
-
* @memberof ExternalApplication
|
|
65
|
-
* @instance
|
|
66
|
-
* @tutorial ExternalApplication.EventEmitter
|
|
67
|
-
*/
|
|
68
|
-
/**
|
|
69
|
-
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
70
|
-
* The listener is added to the beginning of the listeners array.
|
|
71
|
-
* @param eventType - The type of the event.
|
|
72
|
-
* @param listener - The callback function.
|
|
73
|
-
* @param options - Option to support event timestamps.
|
|
74
|
-
*
|
|
75
|
-
* @function prependOnceListener
|
|
76
|
-
* @memberof ExternalApplication
|
|
77
|
-
* @instance
|
|
78
|
-
* @tutorial ExternalApplication.EventEmitter
|
|
79
|
-
*/
|
|
80
|
-
/**
|
|
81
|
-
* Remove a listener from the listener array for the specified event.
|
|
82
|
-
* Caution: Calling this method changes the array indices in the listener array behind the listener.
|
|
83
|
-
* @param eventType - The type of the event.
|
|
84
|
-
* @param listener - The callback function.
|
|
85
|
-
* @param options - Option to support event timestamps.
|
|
86
|
-
*
|
|
87
|
-
* @function removeListener
|
|
88
|
-
* @memberof ExternalApplication
|
|
89
|
-
* @instance
|
|
90
|
-
* @tutorial ExternalApplication.EventEmitter
|
|
91
|
-
*/
|
|
92
|
-
/**
|
|
93
|
-
* Removes all listeners, or those of the specified event.
|
|
94
|
-
* @param eventType - The type of the event.
|
|
95
|
-
*
|
|
96
|
-
* @function removeAllListeners
|
|
97
|
-
* @memberof ExternalApplication
|
|
98
|
-
* @instance
|
|
99
|
-
* @tutorial ExternalApplication.EventEmitter
|
|
100
|
-
*/
|
|
101
|
-
/**
|
|
102
|
-
* Retrieves information about the external application.
|
|
103
|
-
*
|
|
104
|
-
* @example
|
|
105
|
-
* ```js
|
|
106
|
-
* async function getInfo() {
|
|
107
|
-
* const extApp = await fin.ExternalApplication.wrap('javaApp-uuid');
|
|
108
|
-
* return await extApp.getInfo();
|
|
109
|
-
* }
|
|
110
|
-
* getInfo().then(info => console.log(info)).catch(err => console.log(err));
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
getInfo() {
|
|
114
|
-
return this.wire.sendAction('get-external-application-info', this.identity).then(({ payload }) => payload.data);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
exports.ExternalApplication = ExternalApplication;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Entry point for the OpenFin ExternalApplication namespace.
|
|
3
|
-
*
|
|
4
|
-
* Because TypeDoc does not currently support multiple modules with the same name, the module alias "ExternalApplicationModule" is used for
|
|
5
|
-
* the module containing static members of the `ExternalApplication` namespace (available under `fin.ExternalApplication`), while `ExternalApplication`
|
|
6
|
-
* documents instances of the OpenFin `ExternalApplication` class.
|
|
7
|
-
*
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
*/
|
|
10
|
-
import ExternalApplicationModule from './Factory';
|
|
11
|
-
export default ExternalApplicationModule;
|
|
12
|
-
export * from './Instance';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Entry point for the OpenFin ExternalApplication namespace.
|
|
4
|
-
*
|
|
5
|
-
* Because TypeDoc does not currently support multiple modules with the same name, the module alias "ExternalApplicationModule" is used for
|
|
6
|
-
* the module containing static members of the `ExternalApplication` namespace (available under `fin.ExternalApplication`), while `ExternalApplication`
|
|
7
|
-
* documents instances of the OpenFin `ExternalApplication` class.
|
|
8
|
-
*
|
|
9
|
-
* @packageDocumentation
|
|
10
|
-
*/
|
|
11
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
-
}
|
|
17
|
-
Object.defineProperty(o, k2, desc);
|
|
18
|
-
}) : (function(o, m, k, k2) {
|
|
19
|
-
if (k2 === undefined) k2 = k;
|
|
20
|
-
o[k2] = m[k];
|
|
21
|
-
}));
|
|
22
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const Factory_1 = require("./Factory");
|
|
27
|
-
exports.default = Factory_1.default;
|
|
28
|
-
__exportStar(require("./Instance"), exports);
|
package/src/api/fin.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
import type * as OpenFin from '../OpenFin';
|
|
4
|
-
import { Transport } from '../transport/transport';
|
|
5
|
-
import System from './system/index';
|
|
6
|
-
import _WindowModule from './window/index';
|
|
7
|
-
import ApplicationModule from './application/index';
|
|
8
|
-
import InterApplicationBus from './interappbus/index';
|
|
9
|
-
import Clipboard from './clipboard/index';
|
|
10
|
-
import ExternalApplicationModule from './external-application/index';
|
|
11
|
-
import _FrameModule from './frame/index';
|
|
12
|
-
import GlobalHotkey from './global-hotkey/index';
|
|
13
|
-
import ViewModule from './view/index';
|
|
14
|
-
import PlatformModule from './platform/index';
|
|
15
|
-
import { Me } from './me';
|
|
16
|
-
import InteropModule from './interop';
|
|
17
|
-
import SnapshotSourceModule from './snapshot-source';
|
|
18
|
-
type EntityType = OpenFin.EntityType;
|
|
19
|
-
export interface FinApi<MeType extends EntityType> {
|
|
20
|
-
readonly System: System;
|
|
21
|
-
readonly Window: _WindowModule;
|
|
22
|
-
readonly Application: ApplicationModule;
|
|
23
|
-
readonly InterApplicationBus: InterApplicationBus;
|
|
24
|
-
readonly Clipboard: Clipboard;
|
|
25
|
-
readonly ExternalApplication: ExternalApplicationModule;
|
|
26
|
-
readonly Frame: _FrameModule;
|
|
27
|
-
readonly GlobalHotkey: GlobalHotkey;
|
|
28
|
-
readonly View: ViewModule;
|
|
29
|
-
readonly Platform: PlatformModule;
|
|
30
|
-
readonly Interop: InteropModule;
|
|
31
|
-
readonly SnapshotSource: SnapshotSourceModule;
|
|
32
|
-
readonly me: Me<MeType>;
|
|
33
|
-
}
|
|
34
|
-
export default class Fin<MeType extends EntityType = EntityType> extends EventEmitter implements FinApi<MeType> {
|
|
35
|
-
private wire;
|
|
36
|
-
System: System;
|
|
37
|
-
Window: _WindowModule;
|
|
38
|
-
Application: ApplicationModule;
|
|
39
|
-
InterApplicationBus: InterApplicationBus;
|
|
40
|
-
Clipboard: Clipboard;
|
|
41
|
-
ExternalApplication: ExternalApplicationModule;
|
|
42
|
-
Frame: _FrameModule;
|
|
43
|
-
GlobalHotkey: GlobalHotkey;
|
|
44
|
-
View: ViewModule;
|
|
45
|
-
Platform: PlatformModule;
|
|
46
|
-
Interop: InteropModule;
|
|
47
|
-
SnapshotSource: SnapshotSourceModule;
|
|
48
|
-
readonly me: Me<MeType>;
|
|
49
|
-
/**
|
|
50
|
-
* @internal
|
|
51
|
-
*/
|
|
52
|
-
constructor(wire: Transport<MeType>);
|
|
53
|
-
}
|
|
54
|
-
export {};
|
package/src/api/fin.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const events_1 = require("events");
|
|
4
|
-
// Import from the file rather than the directory in case someone consuming types is using module resolution other than "node"
|
|
5
|
-
const index_1 = require("./system/index");
|
|
6
|
-
const index_2 = require("./window/index");
|
|
7
|
-
const index_3 = require("./application/index");
|
|
8
|
-
const index_4 = require("./interappbus/index");
|
|
9
|
-
const index_5 = require("./clipboard/index");
|
|
10
|
-
const index_6 = require("./external-application/index");
|
|
11
|
-
const index_7 = require("./frame/index");
|
|
12
|
-
const index_8 = require("./global-hotkey/index");
|
|
13
|
-
const index_9 = require("./view/index");
|
|
14
|
-
const index_10 = require("./platform/index");
|
|
15
|
-
const me_1 = require("./me");
|
|
16
|
-
const interop_1 = require("./interop");
|
|
17
|
-
const snapshot_source_1 = require("./snapshot-source");
|
|
18
|
-
class Fin extends events_1.EventEmitter {
|
|
19
|
-
/**
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
constructor(wire) {
|
|
23
|
-
super();
|
|
24
|
-
this.wire = wire;
|
|
25
|
-
this.System = new index_1.default(wire);
|
|
26
|
-
this.Window = new index_2.default(wire);
|
|
27
|
-
this.Application = new index_3.default(wire);
|
|
28
|
-
this.InterApplicationBus = new index_4.default(wire);
|
|
29
|
-
this.Clipboard = new index_5.default(wire);
|
|
30
|
-
this.ExternalApplication = new index_6.default(wire);
|
|
31
|
-
this.Frame = new index_7.default(wire);
|
|
32
|
-
this.GlobalHotkey = new index_8.default(wire);
|
|
33
|
-
this.Platform = new index_10.default(wire, this.InterApplicationBus.Channel);
|
|
34
|
-
this.View = new index_9.default(wire);
|
|
35
|
-
this.Interop = new interop_1.default(wire);
|
|
36
|
-
this.SnapshotSource = new snapshot_source_1.default(wire);
|
|
37
|
-
wire.registerFin(this);
|
|
38
|
-
this.me = (0, me_1.getMe)(wire);
|
|
39
|
-
// Handle disconnect events
|
|
40
|
-
wire.on('disconnected', () => {
|
|
41
|
-
this.emit('disconnected');
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.default = Fin;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type * as OpenFin from '../../OpenFin';
|
|
2
|
-
import { Base } from '../base';
|
|
3
|
-
export default class _FrameModule extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* Asynchronously returns a reference to the specified frame. The frame does not have to exist
|
|
6
|
-
* @param identity - the identity of the frame you want to wrap
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```js
|
|
10
|
-
* fin.Frame.wrap({ uuid: 'testFrame', name: 'testFrame' })
|
|
11
|
-
* .then(frm => console.log('wrapped frame'))
|
|
12
|
-
* .catch(err => console.log(err));
|
|
13
|
-
* ```
|
|
14
|
-
* @static
|
|
15
|
-
*/
|
|
16
|
-
wrap(identity: OpenFin.Identity): Promise<OpenFin.Frame>;
|
|
17
|
-
/**
|
|
18
|
-
* Synchronously returns a reference to the specified frame. The frame does not have to exist
|
|
19
|
-
* @param identity - the identity of the frame you want to wrap
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```js
|
|
23
|
-
* const frm = fin.Frame.wrapSync({ uuid: 'testFrame', name: 'testFrame' });
|
|
24
|
-
* const info = await frm.getInfo();
|
|
25
|
-
* console.log(info);
|
|
26
|
-
* ```
|
|
27
|
-
* @static
|
|
28
|
-
*/
|
|
29
|
-
wrapSync(identity: OpenFin.Identity): OpenFin.Frame;
|
|
30
|
-
/**
|
|
31
|
-
* Asynchronously returns a reference to the current frame
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```js
|
|
35
|
-
* fin.Frame.getCurrent()
|
|
36
|
-
* .then(frm => console.log('current frame'))
|
|
37
|
-
* .catch(err => console.log(err));
|
|
38
|
-
* ```
|
|
39
|
-
* @static
|
|
40
|
-
*/
|
|
41
|
-
getCurrent(): Promise<OpenFin.Frame>;
|
|
42
|
-
/**
|
|
43
|
-
* Synchronously returns a reference to the current frame
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```js
|
|
47
|
-
* const frm = fin.Frame.getCurrentSync();
|
|
48
|
-
* const info = await frm.getInfo();
|
|
49
|
-
* console.log(info);
|
|
50
|
-
* ```
|
|
51
|
-
* @static
|
|
52
|
-
*/
|
|
53
|
-
getCurrentSync(): OpenFin.Frame;
|
|
54
|
-
}
|
package/src/api/frame/Factory.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const base_1 = require("../base");
|
|
4
|
-
const validate_1 = require("../../util/validate");
|
|
5
|
-
const Instance_1 = require("./Instance");
|
|
6
|
-
class _FrameModule extends base_1.Base {
|
|
7
|
-
/**
|
|
8
|
-
* Asynchronously returns a reference to the specified frame. The frame does not have to exist
|
|
9
|
-
* @param identity - the identity of the frame you want to wrap
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```js
|
|
13
|
-
* fin.Frame.wrap({ uuid: 'testFrame', name: 'testFrame' })
|
|
14
|
-
* .then(frm => console.log('wrapped frame'))
|
|
15
|
-
* .catch(err => console.log(err));
|
|
16
|
-
* ```
|
|
17
|
-
* @static
|
|
18
|
-
*/
|
|
19
|
-
async wrap(identity) {
|
|
20
|
-
this.wire.sendAction('frame-wrap').catch((e) => {
|
|
21
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
22
|
-
});
|
|
23
|
-
const errorMsg = (0, validate_1.validateIdentity)(identity);
|
|
24
|
-
if (errorMsg) {
|
|
25
|
-
throw new Error(errorMsg);
|
|
26
|
-
}
|
|
27
|
-
return new Instance_1._Frame(this.wire, identity);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Synchronously returns a reference to the specified frame. The frame does not have to exist
|
|
31
|
-
* @param identity - the identity of the frame you want to wrap
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```js
|
|
35
|
-
* const frm = fin.Frame.wrapSync({ uuid: 'testFrame', name: 'testFrame' });
|
|
36
|
-
* const info = await frm.getInfo();
|
|
37
|
-
* console.log(info);
|
|
38
|
-
* ```
|
|
39
|
-
* @static
|
|
40
|
-
*/
|
|
41
|
-
wrapSync(identity) {
|
|
42
|
-
this.wire.sendAction('frame-wrap-sync').catch((e) => {
|
|
43
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
44
|
-
});
|
|
45
|
-
const errorMsg = (0, validate_1.validateIdentity)(identity);
|
|
46
|
-
if (errorMsg) {
|
|
47
|
-
throw new Error(errorMsg);
|
|
48
|
-
}
|
|
49
|
-
return new Instance_1._Frame(this.wire, identity);
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Asynchronously returns a reference to the current frame
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```js
|
|
56
|
-
* fin.Frame.getCurrent()
|
|
57
|
-
* .then(frm => console.log('current frame'))
|
|
58
|
-
* .catch(err => console.log(err));
|
|
59
|
-
* ```
|
|
60
|
-
* @static
|
|
61
|
-
*/
|
|
62
|
-
getCurrent() {
|
|
63
|
-
this.wire.sendAction('frame-get-current').catch((e) => {
|
|
64
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
65
|
-
});
|
|
66
|
-
return Promise.resolve(new Instance_1._Frame(this.wire, this.wire.environment.getCurrentEntityIdentity()));
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Synchronously returns a reference to the current frame
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```js
|
|
73
|
-
* const frm = fin.Frame.getCurrentSync();
|
|
74
|
-
* const info = await frm.getInfo();
|
|
75
|
-
* console.log(info);
|
|
76
|
-
* ```
|
|
77
|
-
* @static
|
|
78
|
-
*/
|
|
79
|
-
getCurrentSync() {
|
|
80
|
-
this.wire.sendAction('frame-get-current-sync').catch((e) => {
|
|
81
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
82
|
-
});
|
|
83
|
-
return new Instance_1._Frame(this.wire, this.wire.environment.getCurrentEntityIdentity());
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
exports.default = _FrameModule;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import type * as OpenFin from '../../OpenFin';
|
|
2
|
-
import { EmitterBase } from '../base';
|
|
3
|
-
import { Transport } from '../../transport/transport';
|
|
4
|
-
type FrameEvents = OpenFin.FrameEvent;
|
|
5
|
-
/**
|
|
6
|
-
* An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
|
|
7
|
-
* has its own DOM and global JS context (which may or may not be linked to that of the parent depending
|
|
8
|
-
* on if it is considered out of the root domain or not), it represents a unique endpoint as an OpenFin
|
|
9
|
-
* connection. Iframes may be generated dynamically, or be present on initial page load and each non-CORS
|
|
10
|
-
* iframe has the OpenFin API injected by default. It is possible to opt into cross-origin iframes having
|
|
11
|
-
* the API by setting api.iframe.crossOriginInjection to true in a window's options. To block all iframes
|
|
12
|
-
* from getting the API injected you can set api.frame.sameOriginInjection
|
|
13
|
-
* to false <a href="Window.html#~options" target="_blank">({@link OpenFin.WindowCreationOptions see Window Options})</a>.
|
|
14
|
-
*
|
|
15
|
-
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
16
|
-
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
17
|
-
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
18
|
-
* Just as a call to window.open outside of our Window API returns a new window with a random GUID assigned
|
|
19
|
-
* for the name, each iframe that has the API injected will be assigned a GUID as its name, the UUID will be
|
|
20
|
-
* the same as the parent window's.
|
|
21
|
-
*
|
|
22
|
-
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
23
|
-
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
24
|
-
*/
|
|
25
|
-
export declare class _Frame extends EmitterBase<FrameEvents> {
|
|
26
|
-
identity: OpenFin.Identity;
|
|
27
|
-
/**
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
constructor(wire: Transport, identity: OpenFin.Identity);
|
|
31
|
-
/**
|
|
32
|
-
* Adds the listener function to the end of the listeners array for the specified event type.
|
|
33
|
-
* @param eventType - The type of the event.
|
|
34
|
-
* @param listener - Called whenever an event of the specified type occurs.
|
|
35
|
-
* @param options - Option to support event timestamps.
|
|
36
|
-
*
|
|
37
|
-
* @function addListener
|
|
38
|
-
* @memberof Frame
|
|
39
|
-
* @instance
|
|
40
|
-
* @tutorial Frame.EventEmitter
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
|
44
|
-
* @param eventType - The type of the event.
|
|
45
|
-
* @param listener - Called whenever an event of the specified type occurs.
|
|
46
|
-
* @param options - Option to support event timestamps.
|
|
47
|
-
*
|
|
48
|
-
* @function on
|
|
49
|
-
* @memberof Frame
|
|
50
|
-
* @instance
|
|
51
|
-
* @tutorial Frame.EventEmitter
|
|
52
|
-
*/
|
|
53
|
-
/**
|
|
54
|
-
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
55
|
-
* @param eventType - The type of the event.
|
|
56
|
-
* @param listener - The callback function.
|
|
57
|
-
* @param options - Option to support event timestamps.
|
|
58
|
-
*
|
|
59
|
-
* @function once
|
|
60
|
-
* @memberof Frame
|
|
61
|
-
* @instance
|
|
62
|
-
* @tutorial Frame.EventEmitter
|
|
63
|
-
*/
|
|
64
|
-
/**
|
|
65
|
-
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
66
|
-
* @param eventType - The type of the event.
|
|
67
|
-
* @param listener - The callback function.
|
|
68
|
-
* @param options - Option to support event timestamps.
|
|
69
|
-
*
|
|
70
|
-
* @function prependListener
|
|
71
|
-
* @memberof Frame
|
|
72
|
-
* @instance
|
|
73
|
-
* @tutorial Frame.EventEmitter
|
|
74
|
-
*/
|
|
75
|
-
/**
|
|
76
|
-
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
77
|
-
* The listener is added to the beginning of the listeners array.
|
|
78
|
-
* @param eventType - The type of the event.
|
|
79
|
-
* @param listener - The callback function.
|
|
80
|
-
* @param options - Option to support event timestamps.
|
|
81
|
-
*
|
|
82
|
-
* @function prependOnceListener
|
|
83
|
-
* @memberof Frame
|
|
84
|
-
* @instance
|
|
85
|
-
* @tutorial Frame.EventEmitter
|
|
86
|
-
*/
|
|
87
|
-
/**
|
|
88
|
-
* Remove a listener from the listener array for the specified event.
|
|
89
|
-
* Caution: Calling this method changes the array indices in the listener array behind the listener.
|
|
90
|
-
* @param eventType - The type of the event.
|
|
91
|
-
* @param listener - The callback function.
|
|
92
|
-
* @param options - Option to support event timestamps.
|
|
93
|
-
*
|
|
94
|
-
* @function removeListener
|
|
95
|
-
* @memberof Frame
|
|
96
|
-
* @instance
|
|
97
|
-
* @tutorial Frame.EventEmitter
|
|
98
|
-
*/
|
|
99
|
-
/**
|
|
100
|
-
* Removes all listeners, or those of the specified event.
|
|
101
|
-
* @param eventType - The type of the event.
|
|
102
|
-
*
|
|
103
|
-
* @function removeAllListeners
|
|
104
|
-
* @memberof Frame
|
|
105
|
-
* @instance
|
|
106
|
-
* @tutorial Frame.EventEmitter
|
|
107
|
-
*/
|
|
108
|
-
/**
|
|
109
|
-
* Returns a frame info object for the represented frame.
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* ```js
|
|
113
|
-
* async function getInfo() {
|
|
114
|
-
* const frm = await fin.Frame.getCurrent();
|
|
115
|
-
* return await frm.getInfo();
|
|
116
|
-
* }
|
|
117
|
-
* getInfo().then(info => console.log(info)).catch(err => console.log(err));
|
|
118
|
-
* ```
|
|
119
|
-
*/
|
|
120
|
-
getInfo(): Promise<OpenFin.FrameInfo>;
|
|
121
|
-
/**
|
|
122
|
-
* Returns a frame info object representing the window that the referenced iframe is
|
|
123
|
-
* currently embedded in.
|
|
124
|
-
*
|
|
125
|
-
* @example
|
|
126
|
-
* ```js
|
|
127
|
-
* async function getParentWindow() {
|
|
128
|
-
* const frm = await fin.Frame.getCurrent();
|
|
129
|
-
* return await frm.getParentWindow();
|
|
130
|
-
* }
|
|
131
|
-
* getParentWindow().then(winInfo => console.log(winInfo)).catch(err => console.log(err));
|
|
132
|
-
* ```
|
|
133
|
-
*/
|
|
134
|
-
getParentWindow(): Promise<OpenFin.FrameInfo>;
|
|
135
|
-
}
|
|
136
|
-
export {};
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._Frame = void 0;
|
|
4
|
-
/* eslint-disable import/prefer-default-export */
|
|
5
|
-
const base_1 = require("../base");
|
|
6
|
-
/**
|
|
7
|
-
* An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
|
|
8
|
-
* has its own DOM and global JS context (which may or may not be linked to that of the parent depending
|
|
9
|
-
* on if it is considered out of the root domain or not), it represents a unique endpoint as an OpenFin
|
|
10
|
-
* connection. Iframes may be generated dynamically, or be present on initial page load and each non-CORS
|
|
11
|
-
* iframe has the OpenFin API injected by default. It is possible to opt into cross-origin iframes having
|
|
12
|
-
* the API by setting api.iframe.crossOriginInjection to true in a window's options. To block all iframes
|
|
13
|
-
* from getting the API injected you can set api.frame.sameOriginInjection
|
|
14
|
-
* to false <a href="Window.html#~options" target="_blank">({@link OpenFin.WindowCreationOptions see Window Options})</a>.
|
|
15
|
-
*
|
|
16
|
-
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
17
|
-
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
18
|
-
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
19
|
-
* Just as a call to window.open outside of our Window API returns a new window with a random GUID assigned
|
|
20
|
-
* for the name, each iframe that has the API injected will be assigned a GUID as its name, the UUID will be
|
|
21
|
-
* the same as the parent window's.
|
|
22
|
-
*
|
|
23
|
-
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
24
|
-
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
25
|
-
*/
|
|
26
|
-
class _Frame extends base_1.EmitterBase {
|
|
27
|
-
/**
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
constructor(wire, identity) {
|
|
31
|
-
super(wire, 'frame', identity.uuid, identity.name);
|
|
32
|
-
this.identity = identity;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Adds the listener function to the end of the listeners array for the specified event type.
|
|
36
|
-
* @param eventType - The type of the event.
|
|
37
|
-
* @param listener - Called whenever an event of the specified type occurs.
|
|
38
|
-
* @param options - Option to support event timestamps.
|
|
39
|
-
*
|
|
40
|
-
* @function addListener
|
|
41
|
-
* @memberof Frame
|
|
42
|
-
* @instance
|
|
43
|
-
* @tutorial Frame.EventEmitter
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
|
47
|
-
* @param eventType - The type of the event.
|
|
48
|
-
* @param listener - Called whenever an event of the specified type occurs.
|
|
49
|
-
* @param options - Option to support event timestamps.
|
|
50
|
-
*
|
|
51
|
-
* @function on
|
|
52
|
-
* @memberof Frame
|
|
53
|
-
* @instance
|
|
54
|
-
* @tutorial Frame.EventEmitter
|
|
55
|
-
*/
|
|
56
|
-
/**
|
|
57
|
-
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
58
|
-
* @param eventType - The type of the event.
|
|
59
|
-
* @param listener - The callback function.
|
|
60
|
-
* @param options - Option to support event timestamps.
|
|
61
|
-
*
|
|
62
|
-
* @function once
|
|
63
|
-
* @memberof Frame
|
|
64
|
-
* @instance
|
|
65
|
-
* @tutorial Frame.EventEmitter
|
|
66
|
-
*/
|
|
67
|
-
/**
|
|
68
|
-
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
69
|
-
* @param eventType - The type of the event.
|
|
70
|
-
* @param listener - The callback function.
|
|
71
|
-
* @param options - Option to support event timestamps.
|
|
72
|
-
*
|
|
73
|
-
* @function prependListener
|
|
74
|
-
* @memberof Frame
|
|
75
|
-
* @instance
|
|
76
|
-
* @tutorial Frame.EventEmitter
|
|
77
|
-
*/
|
|
78
|
-
/**
|
|
79
|
-
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
80
|
-
* The listener is added to the beginning of the listeners array.
|
|
81
|
-
* @param eventType - The type of the event.
|
|
82
|
-
* @param listener - The callback function.
|
|
83
|
-
* @param options - Option to support event timestamps.
|
|
84
|
-
*
|
|
85
|
-
* @function prependOnceListener
|
|
86
|
-
* @memberof Frame
|
|
87
|
-
* @instance
|
|
88
|
-
* @tutorial Frame.EventEmitter
|
|
89
|
-
*/
|
|
90
|
-
/**
|
|
91
|
-
* Remove a listener from the listener array for the specified event.
|
|
92
|
-
* Caution: Calling this method changes the array indices in the listener array behind the listener.
|
|
93
|
-
* @param eventType - The type of the event.
|
|
94
|
-
* @param listener - The callback function.
|
|
95
|
-
* @param options - Option to support event timestamps.
|
|
96
|
-
*
|
|
97
|
-
* @function removeListener
|
|
98
|
-
* @memberof Frame
|
|
99
|
-
* @instance
|
|
100
|
-
* @tutorial Frame.EventEmitter
|
|
101
|
-
*/
|
|
102
|
-
/**
|
|
103
|
-
* Removes all listeners, or those of the specified event.
|
|
104
|
-
* @param eventType - The type of the event.
|
|
105
|
-
*
|
|
106
|
-
* @function removeAllListeners
|
|
107
|
-
* @memberof Frame
|
|
108
|
-
* @instance
|
|
109
|
-
* @tutorial Frame.EventEmitter
|
|
110
|
-
*/
|
|
111
|
-
/**
|
|
112
|
-
* Returns a frame info object for the represented frame.
|
|
113
|
-
*
|
|
114
|
-
* @example
|
|
115
|
-
* ```js
|
|
116
|
-
* async function getInfo() {
|
|
117
|
-
* const frm = await fin.Frame.getCurrent();
|
|
118
|
-
* return await frm.getInfo();
|
|
119
|
-
* }
|
|
120
|
-
* getInfo().then(info => console.log(info)).catch(err => console.log(err));
|
|
121
|
-
* ```
|
|
122
|
-
*/
|
|
123
|
-
getInfo() {
|
|
124
|
-
return this.wire.sendAction('get-frame-info', this.identity).then(({ payload }) => payload.data);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Returns a frame info object representing the window that the referenced iframe is
|
|
128
|
-
* currently embedded in.
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* ```js
|
|
132
|
-
* async function getParentWindow() {
|
|
133
|
-
* const frm = await fin.Frame.getCurrent();
|
|
134
|
-
* return await frm.getParentWindow();
|
|
135
|
-
* }
|
|
136
|
-
* getParentWindow().then(winInfo => console.log(winInfo)).catch(err => console.log(err));
|
|
137
|
-
* ```
|
|
138
|
-
*/
|
|
139
|
-
getParentWindow() {
|
|
140
|
-
return this.wire.sendAction('get-parent-window', this.identity).then(({ payload }) => payload.data);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
exports._Frame = _Frame;
|