@openfin/core 33.76.27 → 33.76.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/openfin-core-33.76.36.tgz +0 -0
  2. package/package.json +1 -1
  3. package/src/OpenFin.d.ts +27 -16
  4. package/src/api/application/Factory.d.ts +148 -100
  5. package/src/api/application/Factory.js +148 -100
  6. package/src/api/application/Instance.d.ts +477 -106
  7. package/src/api/application/Instance.js +474 -106
  8. package/src/api/application/index.d.ts +9 -0
  9. package/src/api/application/index.js +9 -0
  10. package/src/api/base.d.ts +69 -0
  11. package/src/api/base.js +69 -0
  12. package/src/api/clipboard/index.d.ts +111 -31
  13. package/src/api/clipboard/index.js +111 -31
  14. package/src/api/events/application.d.ts +12 -0
  15. package/src/api/events/application.js +12 -0
  16. package/src/api/events/channel.d.ts +5 -0
  17. package/src/api/events/channel.js +5 -0
  18. package/src/api/events/externalApplication.d.ts +5 -0
  19. package/src/api/events/externalApplication.js +5 -0
  20. package/src/api/events/frame.d.ts +5 -0
  21. package/src/api/events/globalHotkey.d.ts +5 -0
  22. package/src/api/events/platform.d.ts +9 -1
  23. package/src/api/events/platform.js +8 -0
  24. package/src/api/events/system.d.ts +13 -0
  25. package/src/api/events/system.js +13 -0
  26. package/src/api/events/view.d.ts +19 -9
  27. package/src/api/events/view.js +10 -0
  28. package/src/api/events/webcontents.d.ts +21 -10
  29. package/src/api/events/webcontents.js +11 -0
  30. package/src/api/events/window.d.ts +70 -1
  31. package/src/api/events/window.js +10 -0
  32. package/src/api/external-application/Factory.d.ts +16 -9
  33. package/src/api/external-application/Factory.js +16 -9
  34. package/src/api/external-application/Instance.d.ts +40 -32
  35. package/src/api/external-application/Instance.js +40 -32
  36. package/src/api/external-application/index.d.ts +9 -0
  37. package/src/api/external-application/index.js +9 -0
  38. package/src/api/fin.d.ts +3 -0
  39. package/src/api/fin.js +3 -0
  40. package/src/api/frame/Factory.d.ts +30 -13
  41. package/src/api/frame/Factory.js +30 -13
  42. package/src/api/frame/Instance.d.ts +51 -38
  43. package/src/api/frame/Instance.js +51 -38
  44. package/src/api/frame/index.d.ts +11 -0
  45. package/src/api/frame/index.js +11 -0
  46. package/src/api/global-hotkey/index.d.ts +81 -13
  47. package/src/api/global-hotkey/index.js +81 -13
  48. package/src/api/interappbus/channel/channel.d.ts +257 -0
  49. package/src/api/interappbus/channel/channel.js +257 -0
  50. package/src/api/interappbus/channel/channels-docs.d.ts +59 -57
  51. package/src/api/interappbus/channel/channels-docs.js +71 -68
  52. package/src/api/interappbus/channel/client.d.ts +93 -0
  53. package/src/api/interappbus/channel/client.js +93 -1
  54. package/src/api/interappbus/channel/index.d.ts +164 -0
  55. package/src/api/interappbus/channel/index.js +165 -1
  56. package/src/api/interappbus/channel/provider.d.ts +172 -0
  57. package/src/api/interappbus/channel/provider.js +172 -0
  58. package/src/api/interappbus/index.d.ts +55 -20
  59. package/src/api/interappbus/index.js +55 -20
  60. package/src/api/interop/Factory.d.ts +30 -10
  61. package/src/api/interop/Factory.js +30 -10
  62. package/src/api/interop/InteropBroker.d.ts +298 -70
  63. package/src/api/interop/InteropBroker.js +298 -70
  64. package/src/api/interop/InteropClient.d.ts +286 -62
  65. package/src/api/interop/InteropClient.js +286 -62
  66. package/src/api/interop/SessionContextGroupClient.d.ts +2 -2
  67. package/src/api/interop/SessionContextGroupClient.js +2 -2
  68. package/src/api/interop/fdc3/documentationStub.d.ts +14 -0
  69. package/src/api/interop/fdc3/documentationStub.js +17 -0
  70. package/src/api/interop/fdc3/fdc3-1.2.d.ts +31 -34
  71. package/src/api/interop/fdc3/fdc3-1.2.js +31 -34
  72. package/src/api/interop/fdc3/fdc3-2.0.d.ts +48 -51
  73. package/src/api/interop/fdc3/fdc3-2.0.js +48 -51
  74. package/src/api/interop/index.d.ts +8 -0
  75. package/src/api/interop/index.js +8 -0
  76. package/src/api/platform/Factory.d.ts +121 -65
  77. package/src/api/platform/Factory.js +122 -66
  78. package/src/api/platform/Instance.d.ts +551 -48
  79. package/src/api/platform/Instance.js +551 -49
  80. package/src/api/platform/index.d.ts +9 -0
  81. package/src/api/platform/index.js +9 -0
  82. package/src/api/platform/layout/Factory.d.ts +53 -76
  83. package/src/api/platform/layout/Factory.js +53 -76
  84. package/src/api/platform/layout/Instance.d.ts +158 -23
  85. package/src/api/platform/layout/Instance.js +118 -20
  86. package/src/api/platform/layout/entities/layout-entities.d.ts +222 -30
  87. package/src/api/platform/layout/entities/layout-entities.js +222 -30
  88. package/src/api/platform/layout/index.d.ts +9 -0
  89. package/src/api/platform/layout/index.js +9 -0
  90. package/src/api/platform/provider.d.ts +398 -51
  91. package/src/api/snapshot-source/Factory.d.ts +33 -18
  92. package/src/api/snapshot-source/Factory.js +33 -18
  93. package/src/api/snapshot-source/Instance.d.ts +30 -8
  94. package/src/api/snapshot-source/Instance.js +30 -8
  95. package/src/api/snapshot-source/index.d.ts +9 -0
  96. package/src/api/snapshot-source/index.js +9 -0
  97. package/src/api/system/index.d.ts +1137 -186
  98. package/src/api/system/index.js +1142 -186
  99. package/src/api/view/Factory.d.ts +54 -16
  100. package/src/api/view/Factory.js +54 -16
  101. package/src/api/view/Instance.d.ts +330 -216
  102. package/src/api/view/Instance.js +331 -217
  103. package/src/api/view/index.d.ts +9 -0
  104. package/src/api/view/index.js +9 -0
  105. package/src/api/webcontents/main.d.ts +890 -0
  106. package/src/api/webcontents/main.js +890 -0
  107. package/src/api/window/Factory.d.ts +67 -16
  108. package/src/api/window/Factory.js +67 -16
  109. package/src/api/window/Instance.d.ts +824 -316
  110. package/src/api/window/Instance.js +822 -320
  111. package/src/api/window/index.d.ts +11 -0
  112. package/src/api/window/index.js +11 -0
  113. package/src/namespaces.d.ts +1 -0
  114. package/src/namespaces.js +3 -1
  115. package/src/shapes/protocol.d.ts +4 -0
  116. package/openfin-core-33.76.27.tgz +0 -0
@@ -4,28 +4,29 @@ exports.ExternalApplication = void 0;
4
4
  /* eslint-disable import/prefer-default-export */
5
5
  const base_1 = require("../base");
6
6
  /**
7
- * @classdesc An ExternalApplication object representing native language adapter connections to the runtime. Allows
8
- * the developer to listen to <a href="tutorial-ExternalApplication.EventEmitter.html">application events.</a>
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
9
  * Discovery of connections is provided by <a href="tutorial-System.getAllExternalApplications.html">getAllExternalApplications.</a>
10
10
  *
11
11
  * Processes that can be wrapped as `ExternalApplication`s include the following:
12
12
  * - Processes which have connected to an OpenFin runtime via an adapter
13
13
  * - Processes started via `System.launchExternalApplication`
14
14
  * - Processes monitored via `System.monitorExternalProcess`
15
- * @class
16
- * @hideconstructor
17
15
  */
18
16
  class ExternalApplication extends base_1.EmitterBase {
17
+ /**
18
+ * @internal
19
+ */
19
20
  constructor(wire, identity) {
20
21
  super(wire, 'external-application', identity.uuid);
21
22
  this.identity = identity;
22
23
  }
23
24
  /**
24
25
  * Adds a listener to the end of the listeners array for the specified event.
25
- * @param { string | symbol } eventType - The type of the event.
26
- * @param { Function } listener - Called whenever an event of the specified type occurs.
27
- * @param { SubOptions } [options] - Option to support event timestamps.
28
- * @return {Promise.<this>}
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
+ *
29
30
  * @function addListener
30
31
  * @memberof ExternalApplication
31
32
  * @instance
@@ -33,10 +34,10 @@ class ExternalApplication extends base_1.EmitterBase {
33
34
  */
34
35
  /**
35
36
  * Adds a listener to the end of the listeners array for the specified event.
36
- * @param { string | symbol } eventType - The type of the event.
37
- * @param { Function } listener - Called whenever an event of the specified type occurs.
38
- * @param { SubOptions } [options] - Option to support event timestamps.
39
- * @return {Promise.<this>}
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
+ *
40
41
  * @function on
41
42
  * @memberof ExternalApplication
42
43
  * @instance
@@ -44,10 +45,10 @@ class ExternalApplication extends base_1.EmitterBase {
44
45
  */
45
46
  /**
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.
47
- * @param { string | symbol } eventType - The type of the event.
48
- * @param { Function } listener - The callback function.
49
- * @param { SubOptions } [options] - Option to support event timestamps.
50
- * @return {Promise.<this>}
48
+ * @param eventType - The type of the event.
49
+ * @param listener - The callback function.
50
+ * @param options - Option to support event timestamps.
51
+ *
51
52
  * @function once
52
53
  * @memberof ExternalApplication
53
54
  * @instance
@@ -55,10 +56,10 @@ class ExternalApplication extends base_1.EmitterBase {
55
56
  */
56
57
  /**
57
58
  * Adds a listener to the beginning of the listeners array for the specified event.
58
- * @param { string | symbol } eventType - The type of the event.
59
- * @param { Function } listener - The callback function.
60
- * @param { SubOptions } [options] - Option to support event timestamps.
61
- * @return {Promise.<this>}
59
+ * @param eventType - The type of the event.
60
+ * @param listener - The callback function.
61
+ * @param options - Option to support event timestamps.
62
+ *
62
63
  * @function prependListener
63
64
  * @memberof ExternalApplication
64
65
  * @instance
@@ -67,10 +68,10 @@ class ExternalApplication extends base_1.EmitterBase {
67
68
  /**
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.
69
70
  * The listener is added to the beginning of the listeners array.
70
- * @param { string | symbol } eventType - The type of the event.
71
- * @param { Function } listener - The callback function.
72
- * @param { SubOptions } [options] - Option to support event timestamps.
73
- * @return {Promise.<this>}
71
+ * @param eventType - The type of the event.
72
+ * @param listener - The callback function.
73
+ * @param options - Option to support event timestamps.
74
+ *
74
75
  * @function prependOnceListener
75
76
  * @memberof ExternalApplication
76
77
  * @instance
@@ -79,10 +80,10 @@ class ExternalApplication extends base_1.EmitterBase {
79
80
  /**
80
81
  * Remove a listener from the listener array for the specified event.
81
82
  * Caution: Calling this method changes the array indices in the listener array behind the listener.
82
- * @param { string | symbol } eventType - The type of the event.
83
- * @param { Function } listener - The callback function.
84
- * @param { SubOptions } [options] - Option to support event timestamps.
85
- * @return {Promise.<this>}
83
+ * @param eventType - The type of the event.
84
+ * @param listener - The callback function.
85
+ * @param options - Option to support event timestamps.
86
+ *
86
87
  * @function removeListener
87
88
  * @memberof ExternalApplication
88
89
  * @instance
@@ -90,8 +91,8 @@ class ExternalApplication extends base_1.EmitterBase {
90
91
  */
91
92
  /**
92
93
  * Removes all listeners, or those of the specified event.
93
- * @param { string | symbol } [eventType] - The type of the event.
94
- * @return {Promise.<this>}
94
+ * @param eventType - The type of the event.
95
+ *
95
96
  * @function removeAllListeners
96
97
  * @memberof ExternalApplication
97
98
  * @instance
@@ -99,8 +100,15 @@ class ExternalApplication extends base_1.EmitterBase {
99
100
  */
100
101
  /**
101
102
  * Retrieves information about the external application.
102
- * @return {Promise.<ExternalApplicationInfo>}
103
- * @tutorial ExternalApplication.getInfo
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
+ * ```
104
112
  */
105
113
  getInfo() {
106
114
  return this.wire.sendAction('get-external-application-info', this.identity).then(({ payload }) => payload.data);
@@ -1,3 +1,12 @@
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
+ */
1
10
  import ExternalApplicationModule from './Factory';
2
11
  export default ExternalApplicationModule;
3
12
  export * from './Instance';
@@ -1,4 +1,13 @@
1
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
+ */
2
11
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
12
  if (k2 === undefined) k2 = k;
4
13
  var desc = Object.getOwnPropertyDescriptor(m, k);
package/src/api/fin.d.ts CHANGED
@@ -46,6 +46,9 @@ export default class Fin<MeType extends EntityType = EntityType> extends EventEm
46
46
  Interop: InteropModule;
47
47
  SnapshotSource: SnapshotSourceModule;
48
48
  readonly me: Me<MeType>;
49
+ /**
50
+ * @internal
51
+ */
49
52
  constructor(wire: Transport<MeType>);
50
53
  }
51
54
  export {};
package/src/api/fin.js CHANGED
@@ -16,6 +16,9 @@ const me_1 = require("./me");
16
16
  const interop_1 = require("./interop");
17
17
  const snapshot_source_1 = require("./snapshot-source");
18
18
  class Fin extends events_1.EventEmitter {
19
+ /**
20
+ * @internal
21
+ */
19
22
  constructor(wire) {
20
23
  super();
21
24
  this.wire = wire;
@@ -1,36 +1,53 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
2
  import { Base } from '../base';
3
- /**
4
- * @lends Frame
5
- */
6
3
  export default class _FrameModule extends Base {
7
4
  /**
8
5
  * Asynchronously returns a reference to the specified frame. The frame does not have to exist
9
- * @param {Identity} identity - the identity of the frame you want to wrap
10
- * @return {Promise.<_Frame>}
11
- * @tutorial Frame.wrap
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
+ * ```
12
14
  * @static
13
15
  */
14
16
  wrap(identity: OpenFin.Identity): Promise<OpenFin.Frame>;
15
17
  /**
16
18
  * Synchronously returns a reference to the specified frame. The frame does not have to exist
17
- * @param {Identity} identity - the identity of the frame you want to wrap
18
- * @return {_Frame}
19
- * @tutorial Frame.wrapSync
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
+ * ```
20
27
  * @static
21
28
  */
22
29
  wrapSync(identity: OpenFin.Identity): OpenFin.Frame;
23
30
  /**
24
31
  * Asynchronously returns a reference to the current frame
25
- * @return {Promise.<_Frame>}
26
- * @tutorial Frame.getCurrent
32
+ *
33
+ * @example
34
+ * ```js
35
+ * fin.Frame.getCurrent()
36
+ * .then(frm => console.log('current frame'))
37
+ * .catch(err => console.log(err));
38
+ * ```
27
39
  * @static
28
40
  */
29
41
  getCurrent(): Promise<OpenFin.Frame>;
30
42
  /**
31
43
  * Synchronously returns a reference to the current frame
32
- * @return {_Frame}
33
- * @tutorial Frame.getCurrentSync
44
+ *
45
+ * @example
46
+ * ```js
47
+ * const frm = fin.Frame.getCurrentSync();
48
+ * const info = await frm.getInfo();
49
+ * console.log(info);
50
+ * ```
34
51
  * @static
35
52
  */
36
53
  getCurrentSync(): OpenFin.Frame;
@@ -3,15 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const base_1 = require("../base");
4
4
  const validate_1 = require("../../util/validate");
5
5
  const Instance_1 = require("./Instance");
6
- /**
7
- * @lends Frame
8
- */
9
6
  class _FrameModule extends base_1.Base {
10
7
  /**
11
8
  * Asynchronously returns a reference to the specified frame. The frame does not have to exist
12
- * @param {Identity} identity - the identity of the frame you want to wrap
13
- * @return {Promise.<_Frame>}
14
- * @tutorial Frame.wrap
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
+ * ```
15
17
  * @static
16
18
  */
17
19
  async wrap(identity) {
@@ -26,9 +28,14 @@ class _FrameModule extends base_1.Base {
26
28
  }
27
29
  /**
28
30
  * Synchronously returns a reference to the specified frame. The frame does not have to exist
29
- * @param {Identity} identity - the identity of the frame you want to wrap
30
- * @return {_Frame}
31
- * @tutorial Frame.wrapSync
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
+ * ```
32
39
  * @static
33
40
  */
34
41
  wrapSync(identity) {
@@ -43,8 +50,13 @@ class _FrameModule extends base_1.Base {
43
50
  }
44
51
  /**
45
52
  * Asynchronously returns a reference to the current frame
46
- * @return {Promise.<_Frame>}
47
- * @tutorial Frame.getCurrent
53
+ *
54
+ * @example
55
+ * ```js
56
+ * fin.Frame.getCurrent()
57
+ * .then(frm => console.log('current frame'))
58
+ * .catch(err => console.log(err));
59
+ * ```
48
60
  * @static
49
61
  */
50
62
  getCurrent() {
@@ -55,8 +67,13 @@ class _FrameModule extends base_1.Base {
55
67
  }
56
68
  /**
57
69
  * Synchronously returns a reference to the current frame
58
- * @return {_Frame}
59
- * @tutorial Frame.getCurrentSync
70
+ *
71
+ * @example
72
+ * ```js
73
+ * const frm = fin.Frame.getCurrentSync();
74
+ * const info = await frm.getInfo();
75
+ * console.log(info);
76
+ * ```
60
77
  * @static
61
78
  */
62
79
  getCurrentSync() {
@@ -3,7 +3,6 @@ import { EmitterBase } from '../base';
3
3
  import { Transport } from '../../transport/transport';
4
4
  type FrameEvents = OpenFin.FrameEvent;
5
5
  /**
6
- * @classdesc
7
6
  * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
8
7
  * has its own DOM and global JS context (which may or may not be linked to that of the parent depending
9
8
  * on if it is considered out of the root domain or not), it represents a unique endpoint as an OpenFin
@@ -11,7 +10,7 @@ type FrameEvents = OpenFin.FrameEvent;
11
10
  * iframe has the OpenFin API injected by default. It is possible to opt into cross-origin iframes having
12
11
  * the API by setting api.iframe.crossOriginInjection to true in a window's options. To block all iframes
13
12
  * from getting the API injected you can set api.frame.sameOriginInjection
14
- * to false <a href="Window.html#~options" target="_blank">(see Window~options)</a>.
13
+ * to false <a href="Window.html#~options" target="_blank">({@link OpenFin.WindowCreationOptions see Window Options})</a>.
15
14
  *
16
15
  * To be able to directly address this context for eventing and messaging purposes, it needs a
17
16
  * unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
@@ -21,20 +20,20 @@ type FrameEvents = OpenFin.FrameEvent;
21
20
  * the same as the parent window's.
22
21
  *
23
22
  * 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 <a href="tutorial-Frame.EventEmitter.html">frame-specific events</a>.
25
- * @class
26
- * @alias Frame
27
- * @hideconstructor
23
+ * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
28
24
  */
29
25
  export declare class _Frame extends EmitterBase<FrameEvents> {
30
26
  identity: OpenFin.Identity;
27
+ /**
28
+ * @internal
29
+ */
31
30
  constructor(wire: Transport, identity: OpenFin.Identity);
32
31
  /**
33
32
  * Adds the listener function to the end of the listeners array for the specified event type.
34
- * @param { string | symbol } eventType - The type of the event.
35
- * @param { Function } listener - Called whenever an event of the specified type occurs.
36
- * @param { SubOptions } [options] - Option to support event timestamps.
37
- * @return {Promise.<this>}
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
+ *
38
37
  * @function addListener
39
38
  * @memberof Frame
40
39
  * @instance
@@ -42,10 +41,10 @@ export declare class _Frame extends EmitterBase<FrameEvents> {
42
41
  */
43
42
  /**
44
43
  * Adds a listener to the end of the listeners array for the specified event.
45
- * @param { string | symbol } eventType - The type of the event.
46
- * @param { Function } listener - Called whenever an event of the specified type occurs.
47
- * @param { SubOptions } [options] - Option to support event timestamps.
48
- * @return {Promise.<this>}
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
+ *
49
48
  * @function on
50
49
  * @memberof Frame
51
50
  * @instance
@@ -53,10 +52,10 @@ export declare class _Frame extends EmitterBase<FrameEvents> {
53
52
  */
54
53
  /**
55
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.
56
- * @param { string | symbol } eventType - The type of the event.
57
- * @param { Function } listener - The callback function.
58
- * @param { SubOptions } [options] - Option to support event timestamps.
59
- * @return {Promise.<this>}
55
+ * @param eventType - The type of the event.
56
+ * @param listener - The callback function.
57
+ * @param options - Option to support event timestamps.
58
+ *
60
59
  * @function once
61
60
  * @memberof Frame
62
61
  * @instance
@@ -64,10 +63,10 @@ export declare class _Frame extends EmitterBase<FrameEvents> {
64
63
  */
65
64
  /**
66
65
  * Adds a listener to the beginning of the listeners array for the specified event.
67
- * @param { string | symbol } eventType - The type of the event.
68
- * @param { Function } listener - The callback function.
69
- * @param { SubOptions } [options] - Option to support event timestamps.
70
- * @return {Promise.<this>}
66
+ * @param eventType - The type of the event.
67
+ * @param listener - The callback function.
68
+ * @param options - Option to support event timestamps.
69
+ *
71
70
  * @function prependListener
72
71
  * @memberof Frame
73
72
  * @instance
@@ -76,10 +75,10 @@ export declare class _Frame extends EmitterBase<FrameEvents> {
76
75
  /**
77
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.
78
77
  * The listener is added to the beginning of the listeners array.
79
- * @param { string | symbol } eventType - The type of the event.
80
- * @param { Function } listener - The callback function.
81
- * @param { SubOptions } [options] - Option to support event timestamps.
82
- * @return {Promise.<this>}
78
+ * @param eventType - The type of the event.
79
+ * @param listener - The callback function.
80
+ * @param options - Option to support event timestamps.
81
+ *
83
82
  * @function prependOnceListener
84
83
  * @memberof Frame
85
84
  * @instance
@@ -88,10 +87,10 @@ export declare class _Frame extends EmitterBase<FrameEvents> {
88
87
  /**
89
88
  * Remove a listener from the listener array for the specified event.
90
89
  * Caution: Calling this method changes the array indices in the listener array behind the listener.
91
- * @param { string | symbol } eventType - The type of the event.
92
- * @param { Function } listener - The callback function.
93
- * @param { SubOptions } [options] - Option to support event timestamps.
94
- * @return {Promise.<this>}
90
+ * @param eventType - The type of the event.
91
+ * @param listener - The callback function.
92
+ * @param options - Option to support event timestamps.
93
+ *
95
94
  * @function removeListener
96
95
  * @memberof Frame
97
96
  * @instance
@@ -99,24 +98,38 @@ export declare class _Frame extends EmitterBase<FrameEvents> {
99
98
  */
100
99
  /**
101
100
  * Removes all listeners, or those of the specified event.
102
- * @param { string | symbol } [eventType] - The type of the event.
103
- * @return {Promise.<this>}
101
+ * @param eventType - The type of the event.
102
+ *
104
103
  * @function removeAllListeners
105
104
  * @memberof Frame
106
105
  * @instance
107
106
  * @tutorial Frame.EventEmitter
108
107
  */
109
108
  /**
110
- * Returns a frame info object for the represented frame
111
- * @return {Promise.<FrameInfo>}
112
- * @tutorial Frame.getInfo
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
+ * ```
113
119
  */
114
120
  getInfo(): Promise<OpenFin.FrameInfo>;
115
121
  /**
116
122
  * Returns a frame info object representing the window that the referenced iframe is
117
- * currently embedded in
118
- * @return {Promise.<FrameInfo>}
119
- * @tutorial Frame.getParentWindow
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
+ * ```
120
133
  */
121
134
  getParentWindow(): Promise<OpenFin.FrameInfo>;
122
135
  }
@@ -4,7 +4,6 @@ exports._Frame = void 0;
4
4
  /* eslint-disable import/prefer-default-export */
5
5
  const base_1 = require("../base");
6
6
  /**
7
- * @classdesc
8
7
  * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
9
8
  * has its own DOM and global JS context (which may or may not be linked to that of the parent depending
10
9
  * on if it is considered out of the root domain or not), it represents a unique endpoint as an OpenFin
@@ -12,7 +11,7 @@ const base_1 = require("../base");
12
11
  * iframe has the OpenFin API injected by default. It is possible to opt into cross-origin iframes having
13
12
  * the API by setting api.iframe.crossOriginInjection to true in a window's options. To block all iframes
14
13
  * from getting the API injected you can set api.frame.sameOriginInjection
15
- * to false <a href="Window.html#~options" target="_blank">(see Window~options)</a>.
14
+ * to false <a href="Window.html#~options" target="_blank">({@link OpenFin.WindowCreationOptions see Window Options})</a>.
16
15
  *
17
16
  * To be able to directly address this context for eventing and messaging purposes, it needs a
18
17
  * unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
@@ -22,22 +21,22 @@ const base_1 = require("../base");
22
21
  * the same as the parent window's.
23
22
  *
24
23
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
25
- * (iframe or main window) as well as the ability to listen for <a href="tutorial-Frame.EventEmitter.html">frame-specific events</a>.
26
- * @class
27
- * @alias Frame
28
- * @hideconstructor
24
+ * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
29
25
  */
30
26
  class _Frame extends base_1.EmitterBase {
27
+ /**
28
+ * @internal
29
+ */
31
30
  constructor(wire, identity) {
32
31
  super(wire, 'frame', identity.uuid, identity.name);
33
32
  this.identity = identity;
34
33
  }
35
34
  /**
36
35
  * Adds the listener function to the end of the listeners array for the specified event type.
37
- * @param { string | symbol } eventType - The type of the event.
38
- * @param { Function } listener - Called whenever an event of the specified type occurs.
39
- * @param { SubOptions } [options] - Option to support event timestamps.
40
- * @return {Promise.<this>}
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
+ *
41
40
  * @function addListener
42
41
  * @memberof Frame
43
42
  * @instance
@@ -45,10 +44,10 @@ class _Frame extends base_1.EmitterBase {
45
44
  */
46
45
  /**
47
46
  * Adds a listener to the end of the listeners array for the specified event.
48
- * @param { string | symbol } eventType - The type of the event.
49
- * @param { Function } listener - Called whenever an event of the specified type occurs.
50
- * @param { SubOptions } [options] - Option to support event timestamps.
51
- * @return {Promise.<this>}
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
+ *
52
51
  * @function on
53
52
  * @memberof Frame
54
53
  * @instance
@@ -56,10 +55,10 @@ class _Frame extends base_1.EmitterBase {
56
55
  */
57
56
  /**
58
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.
59
- * @param { string | symbol } eventType - The type of the event.
60
- * @param { Function } listener - The callback function.
61
- * @param { SubOptions } [options] - Option to support event timestamps.
62
- * @return {Promise.<this>}
58
+ * @param eventType - The type of the event.
59
+ * @param listener - The callback function.
60
+ * @param options - Option to support event timestamps.
61
+ *
63
62
  * @function once
64
63
  * @memberof Frame
65
64
  * @instance
@@ -67,10 +66,10 @@ class _Frame extends base_1.EmitterBase {
67
66
  */
68
67
  /**
69
68
  * Adds a listener to the beginning of the listeners array for the specified event.
70
- * @param { string | symbol } eventType - The type of the event.
71
- * @param { Function } listener - The callback function.
72
- * @param { SubOptions } [options] - Option to support event timestamps.
73
- * @return {Promise.<this>}
69
+ * @param eventType - The type of the event.
70
+ * @param listener - The callback function.
71
+ * @param options - Option to support event timestamps.
72
+ *
74
73
  * @function prependListener
75
74
  * @memberof Frame
76
75
  * @instance
@@ -79,10 +78,10 @@ class _Frame extends base_1.EmitterBase {
79
78
  /**
80
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.
81
80
  * The listener is added to the beginning of the listeners array.
82
- * @param { string | symbol } eventType - The type of the event.
83
- * @param { Function } listener - The callback function.
84
- * @param { SubOptions } [options] - Option to support event timestamps.
85
- * @return {Promise.<this>}
81
+ * @param eventType - The type of the event.
82
+ * @param listener - The callback function.
83
+ * @param options - Option to support event timestamps.
84
+ *
86
85
  * @function prependOnceListener
87
86
  * @memberof Frame
88
87
  * @instance
@@ -91,10 +90,10 @@ class _Frame extends base_1.EmitterBase {
91
90
  /**
92
91
  * Remove a listener from the listener array for the specified event.
93
92
  * Caution: Calling this method changes the array indices in the listener array behind the listener.
94
- * @param { string | symbol } eventType - The type of the event.
95
- * @param { Function } listener - The callback function.
96
- * @param { SubOptions } [options] - Option to support event timestamps.
97
- * @return {Promise.<this>}
93
+ * @param eventType - The type of the event.
94
+ * @param listener - The callback function.
95
+ * @param options - Option to support event timestamps.
96
+ *
98
97
  * @function removeListener
99
98
  * @memberof Frame
100
99
  * @instance
@@ -102,26 +101,40 @@ class _Frame extends base_1.EmitterBase {
102
101
  */
103
102
  /**
104
103
  * Removes all listeners, or those of the specified event.
105
- * @param { string | symbol } [eventType] - The type of the event.
106
- * @return {Promise.<this>}
104
+ * @param eventType - The type of the event.
105
+ *
107
106
  * @function removeAllListeners
108
107
  * @memberof Frame
109
108
  * @instance
110
109
  * @tutorial Frame.EventEmitter
111
110
  */
112
111
  /**
113
- * Returns a frame info object for the represented frame
114
- * @return {Promise.<FrameInfo>}
115
- * @tutorial Frame.getInfo
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
+ * ```
116
122
  */
117
123
  getInfo() {
118
124
  return this.wire.sendAction('get-frame-info', this.identity).then(({ payload }) => payload.data);
119
125
  }
120
126
  /**
121
127
  * Returns a frame info object representing the window that the referenced iframe is
122
- * currently embedded in
123
- * @return {Promise.<FrameInfo>}
124
- * @tutorial Frame.getParentWindow
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
+ * ```
125
138
  */
126
139
  getParentWindow() {
127
140
  return this.wire.sendAction('get-parent-window', this.identity).then(({ payload }) => payload.data);