Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .cspell/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,10 @@ yari
العاشر
ليونيكود
initjs
vnode
bgload
bgerror
scrolltoupperedge
scrolltoloweredge
scrolltonormalstate
typia
50 changes: 28 additions & 22 deletions docs/en/api/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,13 @@
"collapsed": true,
"collapsible": true,
"items": [
{
"label": "css",
"link": "/api/rspeedy/rspeedy.sourcemap.css",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"label": "js",
"link": "/api/rspeedy/rspeedy.sourcemap.js",
Expand Down Expand Up @@ -661,6 +668,13 @@
}
]
},
{
"label": "splitChunks",
"link": "/api/rspeedy/rspeedy.config.splitchunks",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"label": "tools",
"link": "/api/rspeedy/rspeedy.tools",
Expand Down Expand Up @@ -977,14 +991,6 @@
"collapsible": false,
"items": []
},
{
"label": "enableICU",
"type": "custom-link",
"link": "/api/rspeedy/react-rsbuild-plugin.pluginreactlynxoptions.enableicu",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"label": "enableNewGesture",
"type": "custom-link",
Expand All @@ -994,25 +1000,25 @@
"items": []
},
{
"label": "enableParallelElement",
"label": "enableRemoveCSSScope",
"type": "custom-link",
"link": "/api/rspeedy/react-rsbuild-plugin.pluginreactlynxoptions.enableparallelelement",
"link": "/api/rspeedy/react-rsbuild-plugin.pluginreactlynxoptions.enableremovecssscope",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"label": "enableRemoveCSSScope",
"label": "enableSSR",
"type": "custom-link",
"link": "/api/rspeedy/react-rsbuild-plugin.pluginreactlynxoptions.enableremovecssscope",
"link": "/api/rspeedy/react-rsbuild-plugin.pluginreactlynxoptions.enablessr",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"label": "enableSSR",
"label": "enableUiSourceMap",
"type": "custom-link",
"link": "/api/rspeedy/react-rsbuild-plugin.pluginreactlynxoptions.enablessr",
"link": "/api/rspeedy/react-rsbuild-plugin.pluginreactlynxoptions.enableuisourcemap",
"collapsed": true,
"collapsible": false,
"items": []
Expand All @@ -1033,6 +1039,14 @@
"collapsible": false,
"items": []
},
{
"label": "experimental_useElementTemplate",
"type": "custom-link",
"link": "/api/rspeedy/react-rsbuild-plugin.pluginreactlynxoptions.experimental_useelementtemplate",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"label": "extractStr",
"type": "custom-link",
Expand All @@ -1058,14 +1072,6 @@
"collapsible": false,
"items": []
},
{
"label": "pipelineSchedulerConfig",
"type": "custom-link",
"link": "/api/rspeedy/react-rsbuild-plugin.pluginreactlynxoptions.pipelineschedulerconfig",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"label": "removeDescendantSelectorScope",
"type": "custom-link",
Expand Down
194 changes: 194 additions & 0 deletions docs/en/api/lynx-testing-environment/Class.GlobalEventEmitter.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
{/*
* This file is generated by @lynx-js/tool-typedoc.
* Do not edit this file directly.
* @generated
*/}

{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */}
import * as Lynx from '@lynx';


[lynx-testing-environment](/api/lynx-testing-environment/index.mdx) / GlobalEventEmitter

# Class: GlobalEventEmitter

The Lynx `GlobalEventEmitter` module, accessible via `lynx.getJSModule('GlobalEventEmitter')`.

Framework testing libraries can use this to trigger and listen to cross-thread events.

## Constructors

### new GlobalEventEmitter()

```ts
new GlobalEventEmitter(): GlobalEventEmitter
```

#### Returns

[`GlobalEventEmitter`](/api/lynx-testing-environment/Class.GlobalEventEmitter.mdx)

## Properties

### listeners

```ts
listeners: Record<string, Function[]>;
```

#### Defined in

lynx/GlobalEventEmitter.d.ts:9

## Methods

### addListener()

```ts
addListener(eventName: string, listener: Function): void
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `eventName` | `string` |
| `listener` | `Function` |

#### Returns

`void`

#### Defined in

lynx/GlobalEventEmitter.d.ts:10

***

### clear()

```ts
clear(): void
```

#### Returns

`void`

#### Defined in

lynx/GlobalEventEmitter.d.ts:13

***

### emit()

```ts
emit(eventName: string, args: any[]): void
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `eventName` | `string` |
| `args` | `any`[] |

#### Returns

`void`

#### Defined in

lynx/GlobalEventEmitter.d.ts:12

***

### removeAllListeners()

```ts
removeAllListeners(eventName?: string): void
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `eventName`? | `string` |

#### Returns

`void`

#### Defined in

lynx/GlobalEventEmitter.d.ts:14

***

### removeListener()

```ts
removeListener(eventName: string, listener: Function): void
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `eventName` | `string` |
| `listener` | `Function` |

#### Returns

`void`

#### Defined in

lynx/GlobalEventEmitter.d.ts:11

***

### toggle()

```ts
toggle(eventName: string, ...data: unknown[]): void
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `eventName` | `string` |
| ...`data` | `unknown`[] |

#### Returns

`void`

#### Defined in

lynx/GlobalEventEmitter.d.ts:16

***

### trigger()

```ts
trigger(eventName: string, params: string | Record<any, any>): void
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `eventName` | `string` |
| `params` | `string` \| `Record`\<`any`, `any`\> |

#### Returns

`void`

#### Defined in

lynx/GlobalEventEmitter.d.ts:15
Loading
Loading