fix: make CDPSessionEvent.SessionAttached public (#10941)

This commit is contained in:
jrandolf 2023-09-19 17:42:40 +02:00 committed by GitHub
parent 88e0997b39
commit cfed7b93ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 63 additions and 6 deletions

View File

@ -134,6 +134,12 @@ sidebar_label: API
| [WaitForTargetOptions](./puppeteer.waitfortargetoptions.md) | |
| [WaitTimeoutOptions](./puppeteer.waittimeoutoptions.md) | |
## Namespaces
| Namespace | Description |
| ------------------------------------------------- | --------------------------------------- |
| [CDPSessionEvent](./puppeteer.cdpsessionevent.md) | Events that the CDPSession class emits. |
## Variables
| Variable | Description |

View File

@ -0,0 +1,20 @@
---
sidebar_label: CDPSessionEvent
---
# CDPSessionEvent namespace
Events that the CDPSession class emits.
#### Signature:
```typescript
export declare namespace CDPSessionEvent
```
## Variables
| Variable | Description |
| ----------------------------------------------------------------- | ----------- |
| [SessionAttached](./puppeteer.cdpsessionevent.sessionattached.md) | |
| [SessionDetached](./puppeteer.cdpsessionevent.sessiondetached.md) | |

View File

@ -0,0 +1,11 @@
---
sidebar_label: CDPSessionEvent.SessionAttached
---
# CDPSessionEvent.SessionAttached variable
#### Signature:
```typescript
SessionAttached: 'sessionattached';
```

View File

@ -0,0 +1,11 @@
---
sidebar_label: CDPSessionEvent.SessionDetached
---
# CDPSessionEvent.SessionDetached variable
#### Signature:
```typescript
SessionDetached: 'sessiondetached';
```

View File

@ -11,3 +11,10 @@ export interface CDPSessionEvents extends CDPEvents, Record<EventType, unknown>
```
**Extends:** [CDPEvents](./puppeteer.cdpevents.md), Record&lt;EventType, unknown&gt;
## Properties
| Property | Modifiers | Type | Description | Default |
| --------------- | --------- | --------------------------------------- | ----------- | ------- |
| sessionattached | | [CDPSession](./puppeteer.cdpsession.md) | | |
| sessiondetached | | [CDPSession](./puppeteer.cdpsession.md) | | |

View File

@ -11,21 +11,25 @@ export type CDPEvents = {
};
/**
* Internal events that the CDPSession class emits.
* Events that the CDPSession class emits.
*
* @internal
* @public
*/
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace CDPSessionEvent {
/** @internal */
export const Disconnected = Symbol('CDPSession.Disconnected');
/** @internal */
export const Swapped = Symbol('CDPSession.Swapped');
/**
* Emitted when the session is ready to be configured during the auto-attach
* process. Right after the event is handled, the session will be resumed.
*
* @internal
*/
export const Ready = Symbol('CDPSession.Ready');
export const SessionAttached = Symbol('CDPSession.SessionAttached');
export const SessionDetached = Symbol('CDPSession.SessionDetached');
export const SessionAttached = 'sessionattached' as const;
export const SessionDetached = 'sessiondetached' as const;
}
/**
@ -40,9 +44,7 @@ export interface CDPSessionEvents
[CDPSessionEvent.Swapped]: CDPSession;
/** @internal */
[CDPSessionEvent.Ready]: CDPSession;
/** @internal */
[CDPSessionEvent.SessionAttached]: CDPSession;
/** @internal */
[CDPSessionEvent.SessionDetached]: CDPSession;
}