@adobe/exc-app 0.2.44-test → 0.2.44
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/appapi.d.ts +1 -0
- package/appapi.js +1 -0
- package/appapi.js.map +1 -1
- package/appapi.ts +1 -0
- package/build/preBuild.js +1 -0
- package/capabilityapi.d.ts +6 -0
- package/capabilityapi.js +6 -0
- package/capabilityapi.js.map +1 -1
- package/capabilityapi.ts +6 -0
- package/docs/README.md +1 -1
- package/docs/enums/capabilityapi.capabilityids.md +14 -0
- package/docs/enums/capabilityapi.capabilitynames.md +14 -0
- package/docs/interfaces/appapi.appapi-1.md +2 -2
- package/docs/interfaces/capabilityapi.capabilityapi-1.md +2 -2
- package/docs/interfaces/helpcenter.helpcenterconfig.md +4 -4
- package/docs/interfaces/metrics.analytics.md +6 -6
- package/docs/interfaces/metrics.metrics-1.md +2 -2
- package/docs/interfaces/metrics.metricsapi.md +2 -2
- package/docs/interfaces/network.apolloclientoptions.md +35 -0
- package/docs/interfaces/network.defaultmetadata.md +1 -1
- package/docs/interfaces/network.graphqlquery.md +1 -1
- package/docs/interfaces/network.networkapi.md +37 -4
- package/docs/interfaces/network.queryrequest.md +1 -1
- package/docs/interfaces/page.callback.md +21 -0
- package/docs/interfaces/page.pageapi.md +82 -5
- package/docs/interfaces/permissions.permissionsapi.md +2 -2
- package/docs/interfaces/permissions.permissionsresponse.md +1 -1
- package/docs/interfaces/pulse.pulseapi.md +38 -2
- package/docs/interfaces/pulse.pulsebuttonconfig.md +32 -0
- package/docs/interfaces/pulse.pulsenotification.md +2 -2
- package/docs/interfaces/root.modules.md +161 -0
- package/docs/interfaces/root.runtime.md +102 -0
- package/docs/interfaces/root.runtimeconfiguration.md +392 -0
- package/docs/interfaces/session.sessionapi.md +6 -6
- package/docs/interfaces/settings.parameters.md +1 -1
- package/docs/interfaces/settings.settingsapi.md +6 -6
- package/docs/interfaces/settings.settingsresponse.md +1 -1
- package/docs/interfaces/shell.shellapi.md +6 -6
- package/docs/interfaces/shell.shellinfo.md +1 -1
- package/docs/interfaces/user.imsinfo.md +1 -1
- package/docs/interfaces/user.userapi.md +6 -6
- package/docs/interfaces/user.userinfo.md +2 -2
- package/docs/modules/metrics.md +39 -8
- package/docs/modules/network.md +38 -4
- package/docs/modules/page.md +1 -0
- package/docs/modules/pulse.md +1 -0
- package/docs/modules/root.md +88 -0
- package/internal.d.ts +27 -0
- package/internal.js +12 -0
- package/internal.js.map +1 -1
- package/internal.ts +39 -0
- package/package.json +4 -4
- package/page.d.ts +3 -1
- package/page.js.map +1 -1
- package/page.ts +3 -1
- package/pulse.d.ts +22 -0
- package/pulse.js +6 -0
- package/pulse.js.map +1 -1
- package/pulse.ts +32 -0
- package/tests/pulse.test.js +3 -1
- package/tests/pulse.test.js.map +1 -1
- package/tests/pulse.test.ts +3 -1
- package/coverage/lcov-report/block-navigation.js +0 -79
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sorter.js +0 -170
|
@@ -27,6 +27,8 @@ Defines page-level APIs available to solutions.
|
|
|
27
27
|
|
|
28
28
|
### Methods
|
|
29
29
|
|
|
30
|
+
* [afterPrintHandler](page.pageapi.md#afterprinthandler)
|
|
31
|
+
* [beforePrintHandler](page.pageapi.md#beforeprinthandler)
|
|
30
32
|
* [blockNavigation](page.pageapi.md#blocknavigation)
|
|
31
33
|
* [clipboardWrite](page.pageapi.md#clipboardwrite)
|
|
32
34
|
* [done](page.pageapi.md#done)
|
|
@@ -35,6 +37,7 @@ Defines page-level APIs available to solutions.
|
|
|
35
37
|
* [iframeReload](page.pageapi.md#iframereload)
|
|
36
38
|
* [notFound](page.pageapi.md#notfound)
|
|
37
39
|
* [openInNewTab](page.pageapi.md#openinnewtab)
|
|
40
|
+
* [print](page.pageapi.md#print)
|
|
38
41
|
* [setModalQuerySelectors](page.pageapi.md#setmodalqueryselectors)
|
|
39
42
|
* [shellRedirect](page.pageapi.md#shellredirect)
|
|
40
43
|
|
|
@@ -184,6 +187,52 @@ page.unloadPromptMessage = 'Are you sure you want to leave?';
|
|
|
184
187
|
|
|
185
188
|
## Methods
|
|
186
189
|
|
|
190
|
+
### afterPrintHandler
|
|
191
|
+
|
|
192
|
+
▸ **afterPrintHandler**(`callback`: [Callback](page.callback.md)): void
|
|
193
|
+
|
|
194
|
+
A function that listens and handles the afterPrint event.
|
|
195
|
+
|
|
196
|
+
```typescript
|
|
197
|
+
***Example:***
|
|
198
|
+
page.afterPrintHandler = function () {
|
|
199
|
+
// Revert temporary CSS changes
|
|
200
|
+
};
|
|
201
|
+
````
|
|
202
|
+
|
|
203
|
+
#### Parameters:
|
|
204
|
+
|
|
205
|
+
Name | Type | Description |
|
|
206
|
+
------ | ------ | ------ |
|
|
207
|
+
`callback` | [Callback](page.callback.md) | The function that results in printing. |
|
|
208
|
+
|
|
209
|
+
**Returns:** void
|
|
210
|
+
|
|
211
|
+
___
|
|
212
|
+
|
|
213
|
+
### beforePrintHandler
|
|
214
|
+
|
|
215
|
+
▸ **beforePrintHandler**(`callback`: [Callback](page.callback.md)): void
|
|
216
|
+
|
|
217
|
+
A function that listens and handles the beforePrint event.
|
|
218
|
+
|
|
219
|
+
```typescript
|
|
220
|
+
***Example:***
|
|
221
|
+
page.beforePrintHandler = function () {
|
|
222
|
+
// Temporary CSS changes, like unsetting height
|
|
223
|
+
};
|
|
224
|
+
````
|
|
225
|
+
|
|
226
|
+
#### Parameters:
|
|
227
|
+
|
|
228
|
+
Name | Type | Description |
|
|
229
|
+
------ | ------ | ------ |
|
|
230
|
+
`callback` | [Callback](page.callback.md) | The function that results in printing. |
|
|
231
|
+
|
|
232
|
+
**Returns:** void
|
|
233
|
+
|
|
234
|
+
___
|
|
235
|
+
|
|
187
236
|
### blockNavigation
|
|
188
237
|
|
|
189
238
|
▸ **blockNavigation**(`enabled`: boolean, `options?`: [BlockNavigationOptions](page.blocknavigationoptions.md)): void
|
|
@@ -309,7 +358,7 @@ ___
|
|
|
309
358
|
|
|
310
359
|
### getModalQuerySelectors
|
|
311
360
|
|
|
312
|
-
▸ **getModalQuerySelectors**(): Array
|
|
361
|
+
▸ **getModalQuerySelectors**(): Array<string\>
|
|
313
362
|
|
|
314
363
|
Get the list of selectors presently being used by modalAutoDetect.
|
|
315
364
|
|
|
@@ -319,7 +368,7 @@ Get the list of selectors presently being used by modalAutoDetect.
|
|
|
319
368
|
page.getModalQuerySelectors({path: '/abc'});
|
|
320
369
|
```
|
|
321
370
|
|
|
322
|
-
**Returns:** Array
|
|
371
|
+
**Returns:** Array<string\>
|
|
323
372
|
|
|
324
373
|
The list of selectors presently being used by modalAutoDetect.
|
|
325
374
|
|
|
@@ -388,13 +437,41 @@ Name | Type | Description |
|
|
|
388
437
|
|
|
389
438
|
___
|
|
390
439
|
|
|
440
|
+
### print
|
|
441
|
+
|
|
442
|
+
▸ **print**(`callback`: [Callback](page.callback.md)): void
|
|
443
|
+
|
|
444
|
+
A function to control printing. The callback function should call `window.print()`
|
|
445
|
+
at some point. It's important that the callback not be an arrow function if you
|
|
446
|
+
want the `window` object to be the iframe contents. Feel free to adjust your
|
|
447
|
+
CSS or UI before `window.print()` and reverse those changes afterwards.
|
|
448
|
+
|
|
449
|
+
```typescript
|
|
450
|
+
***Example:***
|
|
451
|
+
page.print = function () {
|
|
452
|
+
window.print();
|
|
453
|
+
};
|
|
454
|
+
````
|
|
455
|
+
|
|
456
|
+
#### Parameters:
|
|
457
|
+
|
|
458
|
+
Name | Type | Description |
|
|
459
|
+
------ | ------ | ------ |
|
|
460
|
+
`callback` | [Callback](page.callback.md) | The function that results in printing. |
|
|
461
|
+
|
|
462
|
+
**Returns:** void
|
|
463
|
+
|
|
464
|
+
___
|
|
465
|
+
|
|
391
466
|
### setModalQuerySelectors
|
|
392
467
|
|
|
393
|
-
▸ **setModalQuerySelectors**(`selectors`: Array
|
|
468
|
+
▸ **setModalQuerySelectors**(`selectors`: Array<string\>): void
|
|
394
469
|
|
|
395
470
|
Set the list of selectors presently being used by modalAutoDetect. If set to an empty
|
|
396
471
|
array, the default selectors used by runtime will be used instead. To stop observing changes
|
|
397
|
-
unset modalAutoDetect.
|
|
472
|
+
unset modalAutoDetect. Setting additonal selectors replaces the currently set selectors, use
|
|
473
|
+
page.getModalQuerySelectors and append new selectors to the returned list before resetting
|
|
474
|
+
to modify the existing list of selectors.
|
|
398
475
|
|
|
399
476
|
***Example:***
|
|
400
477
|
|
|
@@ -406,7 +483,7 @@ page.setModalQuerySelectors(['.someSpecialCaseModal', '.yourNormalModal']);
|
|
|
406
483
|
|
|
407
484
|
Name | Type | Description |
|
|
408
485
|
------ | ------ | ------ |
|
|
409
|
-
`selectors` | Array
|
|
486
|
+
`selectors` | Array<string\> | The list of selectors for modalAutoDetect to use. |
|
|
410
487
|
|
|
411
488
|
**Returns:** void
|
|
412
489
|
|
|
@@ -20,7 +20,7 @@ APIs to get permissions. An app in unified shell can consume PALM ACL service.
|
|
|
20
20
|
|
|
21
21
|
### get
|
|
22
22
|
|
|
23
|
-
▸ **get
|
|
23
|
+
▸ **get**<T\>(`params`: [Parameters](permissions.parameters.md)): Promise<[PermissionsResponse](permissions.permissionsresponse.md)<T\>\>
|
|
24
24
|
|
|
25
25
|
Gets permissions based on the specified parameters.
|
|
26
26
|
|
|
@@ -36,6 +36,6 @@ Name | Type | Description |
|
|
|
36
36
|
------ | ------ | ------ |
|
|
37
37
|
`params` | [Parameters](permissions.parameters.md) | Parameters used to identify permissions to retrieve. |
|
|
38
38
|
|
|
39
|
-
**Returns:** Promise
|
|
39
|
+
**Returns:** Promise<[PermissionsResponse](permissions.permissionsresponse.md)<T\>\>
|
|
40
40
|
|
|
41
41
|
A promise for the specified permissions.
|
|
@@ -13,12 +13,14 @@
|
|
|
13
13
|
### Methods
|
|
14
14
|
|
|
15
15
|
* [send](pulse.pulseapi.md#send)
|
|
16
|
+
* [setButton](pulse.pulseapi.md#setbutton)
|
|
17
|
+
* [setCount](pulse.pulseapi.md#setcount)
|
|
16
18
|
|
|
17
19
|
## Methods
|
|
18
20
|
|
|
19
21
|
### send
|
|
20
22
|
|
|
21
|
-
▸ **send**(`notifications`: [PulseNotification](pulse.pulsenotification.md)[]): Promise
|
|
23
|
+
▸ **send**(`notifications`: [PulseNotification](pulse.pulsenotification.md)[]): Promise<[PulseResponse](pulse.pulseresponse.md)\>
|
|
22
24
|
|
|
23
25
|
Method to send a pulse notification.
|
|
24
26
|
|
|
@@ -28,4 +30,38 @@ Name | Type |
|
|
|
28
30
|
------ | ------ |
|
|
29
31
|
`notifications` | [PulseNotification](pulse.pulsenotification.md)[] |
|
|
30
32
|
|
|
31
|
-
**Returns:** Promise
|
|
33
|
+
**Returns:** Promise<[PulseResponse](pulse.pulseresponse.md)\>
|
|
34
|
+
|
|
35
|
+
___
|
|
36
|
+
|
|
37
|
+
### setButton
|
|
38
|
+
|
|
39
|
+
▸ **setButton**(`buttonConfig`: [PulseButtonConfig](pulse.pulsebuttonconfig.md)): void
|
|
40
|
+
|
|
41
|
+
Adds an additional custom button to the bottom of the Pulse container.
|
|
42
|
+
Will fire the attached callback when a user presses the button.
|
|
43
|
+
|
|
44
|
+
#### Parameters:
|
|
45
|
+
|
|
46
|
+
Name | Type | Description |
|
|
47
|
+
------ | ------ | ------ |
|
|
48
|
+
`buttonConfig` | [PulseButtonConfig](pulse.pulsebuttonconfig.md) | The button configuration |
|
|
49
|
+
|
|
50
|
+
**Returns:** void
|
|
51
|
+
|
|
52
|
+
___
|
|
53
|
+
|
|
54
|
+
### setCount
|
|
55
|
+
|
|
56
|
+
▸ **setCount**(`count`: number): void
|
|
57
|
+
|
|
58
|
+
Adds additional values to the notification.
|
|
59
|
+
If Pulse has 3 internally and this is set to 2, the UI will show 5.
|
|
60
|
+
|
|
61
|
+
#### Parameters:
|
|
62
|
+
|
|
63
|
+
Name | Type | Description |
|
|
64
|
+
------ | ------ | ------ |
|
|
65
|
+
`count` | number | Additional values to add to the pulse notification. |
|
|
66
|
+
|
|
67
|
+
**Returns:** void
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
**[@adobe/exc-app](../README.md)**
|
|
2
|
+
|
|
3
|
+
> [Globals](../README.md) / [pulse](../modules/pulse.md) / PulseButtonConfig
|
|
4
|
+
|
|
5
|
+
# Interface: PulseButtonConfig
|
|
6
|
+
|
|
7
|
+
## Hierarchy
|
|
8
|
+
|
|
9
|
+
* **PulseButtonConfig**
|
|
10
|
+
|
|
11
|
+
## Index
|
|
12
|
+
|
|
13
|
+
### Properties
|
|
14
|
+
|
|
15
|
+
* [callback](pulse.pulsebuttonconfig.md#callback)
|
|
16
|
+
* [label](pulse.pulsebuttonconfig.md#label)
|
|
17
|
+
|
|
18
|
+
## Properties
|
|
19
|
+
|
|
20
|
+
### callback
|
|
21
|
+
|
|
22
|
+
• `Optional` **callback**: undefined \| (value?: any) => void
|
|
23
|
+
|
|
24
|
+
Callback function to be automatically executed on click.
|
|
25
|
+
|
|
26
|
+
___
|
|
27
|
+
|
|
28
|
+
### label
|
|
29
|
+
|
|
30
|
+
• **label**: string
|
|
31
|
+
|
|
32
|
+
Text of the button.
|
|
@@ -39,7 +39,7 @@ ___
|
|
|
39
39
|
|
|
40
40
|
### metadata
|
|
41
41
|
|
|
42
|
-
• `Optional` **metadata**: Record
|
|
42
|
+
• `Optional` **metadata**: Record<string, string\>
|
|
43
43
|
|
|
44
44
|
A map of key value pairs which can be provided by publisher of notification for the consumer.
|
|
45
45
|
|
|
@@ -55,7 +55,7 @@ ___
|
|
|
55
55
|
|
|
56
56
|
### templateParams
|
|
57
57
|
|
|
58
|
-
• **templateParams**: Record
|
|
58
|
+
• **templateParams**: Record<string, any\>
|
|
59
59
|
|
|
60
60
|
Templated parameters.
|
|
61
61
|
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
**[@adobe/exc-app](../README.md)**
|
|
2
|
+
|
|
3
|
+
> [Globals](../README.md) / [root](../modules/root.md) / Modules
|
|
4
|
+
|
|
5
|
+
# Interface: Modules
|
|
6
|
+
|
|
7
|
+
## Hierarchy
|
|
8
|
+
|
|
9
|
+
* **Modules**
|
|
10
|
+
|
|
11
|
+
## Index
|
|
12
|
+
|
|
13
|
+
### Properties
|
|
14
|
+
|
|
15
|
+
* [appApi](root.modules.md#appapi)
|
|
16
|
+
* [capabilityApi](root.modules.md#capabilityapi)
|
|
17
|
+
* [default](root.modules.md#default)
|
|
18
|
+
* [helpCenter](root.modules.md#helpcenter)
|
|
19
|
+
* [internal](root.modules.md#internal)
|
|
20
|
+
* [metrics](root.modules.md#metrics)
|
|
21
|
+
* [network](root.modules.md#network)
|
|
22
|
+
* [nps](root.modules.md#nps)
|
|
23
|
+
* [orgSwitcher](root.modules.md#orgswitcher)
|
|
24
|
+
* [page](root.modules.md#page)
|
|
25
|
+
* [permissions](root.modules.md#permissions)
|
|
26
|
+
* [pulse](root.modules.md#pulse)
|
|
27
|
+
* [runtime](root.modules.md#runtime)
|
|
28
|
+
* [session](root.modules.md#session)
|
|
29
|
+
* [settings](root.modules.md#settings)
|
|
30
|
+
* [shell](root.modules.md#shell)
|
|
31
|
+
* [sidebar](root.modules.md#sidebar)
|
|
32
|
+
* [sidenav](root.modules.md#sidenav)
|
|
33
|
+
* [topbar](root.modules.md#topbar)
|
|
34
|
+
* [user](root.modules.md#user)
|
|
35
|
+
* [userProfile](root.modules.md#userprofile)
|
|
36
|
+
|
|
37
|
+
## Properties
|
|
38
|
+
|
|
39
|
+
### appApi
|
|
40
|
+
|
|
41
|
+
• `Readonly` **appApi**: () => [AppApi](appapi.appapi-1.md)
|
|
42
|
+
|
|
43
|
+
___
|
|
44
|
+
|
|
45
|
+
### capabilityApi
|
|
46
|
+
|
|
47
|
+
• `Readonly` **capabilityApi**: () => [CapabilityApi](capabilityapi.capabilityapi-1.md)
|
|
48
|
+
|
|
49
|
+
___
|
|
50
|
+
|
|
51
|
+
### default
|
|
52
|
+
|
|
53
|
+
• `Readonly` **default**: (options?: any) => [Runtime](root.runtime.md)
|
|
54
|
+
|
|
55
|
+
___
|
|
56
|
+
|
|
57
|
+
### helpCenter
|
|
58
|
+
|
|
59
|
+
• `Readonly` **helpCenter**: [HelpCenterApi](helpcenter.helpcenterapi.md)
|
|
60
|
+
|
|
61
|
+
___
|
|
62
|
+
|
|
63
|
+
### internal
|
|
64
|
+
|
|
65
|
+
• `Readonly` **internal**: InternalApi
|
|
66
|
+
|
|
67
|
+
___
|
|
68
|
+
|
|
69
|
+
### metrics
|
|
70
|
+
|
|
71
|
+
• `Readonly` **metrics**: [MetricsApi](metrics.metricsapi.md)
|
|
72
|
+
|
|
73
|
+
___
|
|
74
|
+
|
|
75
|
+
### network
|
|
76
|
+
|
|
77
|
+
• `Readonly` **network**: [NetworkApi](network.networkapi.md)
|
|
78
|
+
|
|
79
|
+
___
|
|
80
|
+
|
|
81
|
+
### nps
|
|
82
|
+
|
|
83
|
+
• `Readonly` **nps**: [Nps](nps.nps-1.md)
|
|
84
|
+
|
|
85
|
+
___
|
|
86
|
+
|
|
87
|
+
### orgSwitcher
|
|
88
|
+
|
|
89
|
+
• `Readonly` **orgSwitcher**: OrgSwitcherApi
|
|
90
|
+
|
|
91
|
+
___
|
|
92
|
+
|
|
93
|
+
### page
|
|
94
|
+
|
|
95
|
+
• `Readonly` **page**: [PageApi](page.pageapi.md)
|
|
96
|
+
|
|
97
|
+
___
|
|
98
|
+
|
|
99
|
+
### permissions
|
|
100
|
+
|
|
101
|
+
• `Readonly` **permissions**: () => [PermissionsApi](permissions.permissionsapi.md)
|
|
102
|
+
|
|
103
|
+
___
|
|
104
|
+
|
|
105
|
+
### pulse
|
|
106
|
+
|
|
107
|
+
• `Readonly` **pulse**: () => [PulseApi](pulse.pulseapi.md)
|
|
108
|
+
|
|
109
|
+
___
|
|
110
|
+
|
|
111
|
+
### runtime
|
|
112
|
+
|
|
113
|
+
• **runtime**: [Runtime](root.runtime.md)
|
|
114
|
+
|
|
115
|
+
___
|
|
116
|
+
|
|
117
|
+
### session
|
|
118
|
+
|
|
119
|
+
• `Readonly` **session**: () => [SessionApi](session.sessionapi.md)
|
|
120
|
+
|
|
121
|
+
___
|
|
122
|
+
|
|
123
|
+
### settings
|
|
124
|
+
|
|
125
|
+
• `Readonly` **settings**: () => [SettingsApi](settings.settingsapi.md)
|
|
126
|
+
|
|
127
|
+
___
|
|
128
|
+
|
|
129
|
+
### shell
|
|
130
|
+
|
|
131
|
+
• `Readonly` **shell**: () => [ShellApi](shell.shellapi.md)
|
|
132
|
+
|
|
133
|
+
___
|
|
134
|
+
|
|
135
|
+
### sidebar
|
|
136
|
+
|
|
137
|
+
• `Readonly` **sidebar**: SidebarApi
|
|
138
|
+
|
|
139
|
+
___
|
|
140
|
+
|
|
141
|
+
### sidenav
|
|
142
|
+
|
|
143
|
+
• `Readonly` **sidenav**: () => SidenavApi
|
|
144
|
+
|
|
145
|
+
___
|
|
146
|
+
|
|
147
|
+
### topbar
|
|
148
|
+
|
|
149
|
+
• `Readonly` **topbar**: [TopbarApi](topbar.topbarapi.md)
|
|
150
|
+
|
|
151
|
+
___
|
|
152
|
+
|
|
153
|
+
### user
|
|
154
|
+
|
|
155
|
+
• `Readonly` **user**: () => [UserApi](user.userapi.md)
|
|
156
|
+
|
|
157
|
+
___
|
|
158
|
+
|
|
159
|
+
### userProfile
|
|
160
|
+
|
|
161
|
+
• `Readonly` **userProfile**: [UserProfileApi](userprofile.userprofileapi.md)
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
**[@adobe/exc-app](../README.md)**
|
|
2
|
+
|
|
3
|
+
> [Globals](../README.md) / [root](../modules/root.md) / Runtime
|
|
4
|
+
|
|
5
|
+
# Interface: Runtime<T\>
|
|
6
|
+
|
|
7
|
+
Defines the runtime object providing all unified-shell APIs for solution authors.
|
|
8
|
+
|
|
9
|
+
## Type parameters
|
|
10
|
+
|
|
11
|
+
Name | Default |
|
|
12
|
+
------ | ------ |
|
|
13
|
+
`T` | Record<string, any\\> |
|
|
14
|
+
|
|
15
|
+
## Hierarchy
|
|
16
|
+
|
|
17
|
+
* EventEmitter
|
|
18
|
+
|
|
19
|
+
↳ **Runtime**
|
|
20
|
+
|
|
21
|
+
## Index
|
|
22
|
+
|
|
23
|
+
### EventEmitter Methods
|
|
24
|
+
|
|
25
|
+
* [emit](root.runtime.md#emit)
|
|
26
|
+
* [off](root.runtime.md#off)
|
|
27
|
+
* [on](root.runtime.md#on)
|
|
28
|
+
|
|
29
|
+
## EventEmitter Methods
|
|
30
|
+
|
|
31
|
+
### emit
|
|
32
|
+
|
|
33
|
+
▸ **emit**<K\>(`type`: K, `event?`: T[K]): void
|
|
34
|
+
|
|
35
|
+
*Inherited from void*
|
|
36
|
+
|
|
37
|
+
Invoke all handlers for the given type.
|
|
38
|
+
|
|
39
|
+
#### Type parameters:
|
|
40
|
+
|
|
41
|
+
Name | Type |
|
|
42
|
+
------ | ------ |
|
|
43
|
+
`K` | keyof T |
|
|
44
|
+
|
|
45
|
+
#### Parameters:
|
|
46
|
+
|
|
47
|
+
Name | Type | Description |
|
|
48
|
+
------ | ------ | ------ |
|
|
49
|
+
`type` | K | The event type to invoke. |
|
|
50
|
+
`event?` | T[K] | Any value (object is recommended and powerful), passed to each handler. |
|
|
51
|
+
|
|
52
|
+
**Returns:** void
|
|
53
|
+
|
|
54
|
+
___
|
|
55
|
+
|
|
56
|
+
### off
|
|
57
|
+
|
|
58
|
+
▸ **off**<K\>(`type`: K, `handler`: (event?: T[K]) => void): void
|
|
59
|
+
|
|
60
|
+
*Inherited from void*
|
|
61
|
+
|
|
62
|
+
Remove an event handler for the given type.
|
|
63
|
+
|
|
64
|
+
#### Type parameters:
|
|
65
|
+
|
|
66
|
+
Name | Type |
|
|
67
|
+
------ | ------ |
|
|
68
|
+
`K` | keyof T |
|
|
69
|
+
|
|
70
|
+
#### Parameters:
|
|
71
|
+
|
|
72
|
+
Name | Type | Description |
|
|
73
|
+
------ | ------ | ------ |
|
|
74
|
+
`type` | K | Type of event to unregister `handler` from. |
|
|
75
|
+
`handler` | (event?: T[K]) => void | Handler function to remove. |
|
|
76
|
+
|
|
77
|
+
**Returns:** void
|
|
78
|
+
|
|
79
|
+
___
|
|
80
|
+
|
|
81
|
+
### on
|
|
82
|
+
|
|
83
|
+
▸ **on**<K\>(`type`: K, `handler`: (event?: T[K]) => void): void
|
|
84
|
+
|
|
85
|
+
*Inherited from void*
|
|
86
|
+
|
|
87
|
+
Register an event handler for the given type.
|
|
88
|
+
|
|
89
|
+
#### Type parameters:
|
|
90
|
+
|
|
91
|
+
Name | Type |
|
|
92
|
+
------ | ------ |
|
|
93
|
+
`K` | keyof T |
|
|
94
|
+
|
|
95
|
+
#### Parameters:
|
|
96
|
+
|
|
97
|
+
Name | Type | Description |
|
|
98
|
+
------ | ------ | ------ |
|
|
99
|
+
`type` | K | Type of event to listen for. |
|
|
100
|
+
`handler` | (event?: T[K]) => void | Function to call in response to given event. |
|
|
101
|
+
|
|
102
|
+
**Returns:** void
|