chore(docs): fix more documentation warnings (#6145)
This commit is contained in:
parent
928924ed36
commit
054fa2e45d
20
new-docs/puppeteer.credentials.md
Normal file
20
new-docs/puppeteer.credentials.md
Normal file
@ -0,0 +1,20 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Credentials](./puppeteer.credentials.md)
|
||||
|
||||
## Credentials interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface Credentials
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [password](./puppeteer.credentials.password.md) | string | |
|
||||
| [username](./puppeteer.credentials.username.md) | string | |
|
||||
|
11
new-docs/puppeteer.credentials.password.md
Normal file
11
new-docs/puppeteer.credentials.password.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Credentials](./puppeteer.credentials.md) > [password](./puppeteer.credentials.password.md)
|
||||
|
||||
## Credentials.password property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
password: string;
|
||||
```
|
11
new-docs/puppeteer.credentials.username.md
Normal file
11
new-docs/puppeteer.credentials.username.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Credentials](./puppeteer.credentials.md) > [username](./puppeteer.credentials.username.md)
|
||||
|
||||
## Credentials.username property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
username: string;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_childFrames](./puppeteer.frame._childframes.md)
|
||||
|
||||
## Frame.\_childFrames property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_childFrames: Set<Frame>;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_client](./puppeteer.frame._client.md)
|
||||
|
||||
## Frame.\_client property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_client: CDPSession;
|
||||
```
|
@ -1,23 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [(constructor)](./puppeteer.frame._constructor_.md)
|
||||
|
||||
## Frame.(constructor)
|
||||
|
||||
Constructs a new instance of the `Frame` class
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
constructor(frameManager: FrameManager, client: CDPSession, parentFrame: Frame | null, frameId: string);
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| frameManager | [FrameManager](./puppeteer.framemanager.md) | |
|
||||
| client | [CDPSession](./puppeteer.cdpsession.md) | |
|
||||
| parentFrame | [Frame](./puppeteer.frame.md) \| null | |
|
||||
| frameId | string | |
|
||||
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_detached](./puppeteer.frame._detached.md)
|
||||
|
||||
## Frame.\_detached property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_detached: boolean;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_frameManager](./puppeteer.frame._framemanager.md)
|
||||
|
||||
## Frame.\_frameManager property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_frameManager: FrameManager;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_id](./puppeteer.frame._id.md)
|
||||
|
||||
## Frame.\_id property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_id: string;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_lifecycleEvents](./puppeteer.frame._lifecycleevents.md)
|
||||
|
||||
## Frame.\_lifecycleEvents property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_lifecycleEvents: Set<string>;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_loaderId](./puppeteer.frame._loaderid.md)
|
||||
|
||||
## Frame.\_loaderId property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_loaderId: string;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_mainWorld](./puppeteer.frame._mainworld.md)
|
||||
|
||||
## Frame.\_mainWorld property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_mainWorld: DOMWorld;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_name](./puppeteer.frame._name.md)
|
||||
|
||||
## Frame.\_name property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_name?: string;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_parentFrame](./puppeteer.frame._parentframe.md)
|
||||
|
||||
## Frame.\_parentFrame property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_parentFrame?: Frame;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_secondaryWorld](./puppeteer.frame._secondaryworld.md)
|
||||
|
||||
## Frame.\_secondaryWorld property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_secondaryWorld: DOMWorld;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [\_url](./puppeteer.frame._url.md)
|
||||
|
||||
## Frame.\_url property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_url: string;
|
||||
```
|
@ -10,28 +10,9 @@
|
||||
export declare class Frame
|
||||
```
|
||||
|
||||
## Constructors
|
||||
## Remarks
|
||||
|
||||
| Constructor | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [(constructor)(frameManager, client, parentFrame, frameId)](./puppeteer.frame._constructor_.md) | | Constructs a new instance of the <code>Frame</code> class |
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [\_childFrames](./puppeteer.frame._childframes.md) | | Set<[Frame](./puppeteer.frame.md)<!-- -->> | |
|
||||
| [\_client](./puppeteer.frame._client.md) | | [CDPSession](./puppeteer.cdpsession.md) | |
|
||||
| [\_detached](./puppeteer.frame._detached.md) | | boolean | |
|
||||
| [\_frameManager](./puppeteer.frame._framemanager.md) | | [FrameManager](./puppeteer.framemanager.md) | |
|
||||
| [\_id](./puppeteer.frame._id.md) | | string | |
|
||||
| [\_lifecycleEvents](./puppeteer.frame._lifecycleevents.md) | | Set<string> | |
|
||||
| [\_loaderId](./puppeteer.frame._loaderid.md) | | string | |
|
||||
| [\_mainWorld](./puppeteer.frame._mainworld.md) | | DOMWorld | |
|
||||
| [\_name](./puppeteer.frame._name.md) | | string | |
|
||||
| [\_parentFrame](./puppeteer.frame._parentframe.md) | | [Frame](./puppeteer.frame.md) | |
|
||||
| [\_secondaryWorld](./puppeteer.frame._secondaryworld.md) | | DOMWorld | |
|
||||
| [\_url](./puppeteer.frame._url.md) | | string | |
|
||||
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Frame` class.
|
||||
|
||||
## Methods
|
||||
|
||||
|
@ -15,7 +15,7 @@ waitForSelector(selector: string, options?: WaitForSelectorOptions): Promise<Ele
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| selector | string | |
|
||||
| options | WaitForSelectorOptions | |
|
||||
| options | [WaitForSelectorOptions](./puppeteer.waitforselectoroptions.md) | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
@ -15,7 +15,7 @@ waitForXPath(xpath: string, options?: WaitForSelectorOptions): Promise<ElementHa
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| xpath | string | |
|
||||
| options | WaitForSelectorOptions | |
|
||||
| options | [WaitForSelectorOptions](./puppeteer.waitforselectoroptions.md) | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_client](./puppeteer.framemanager._client.md)
|
||||
|
||||
## FrameManager.\_client property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_client: CDPSession;
|
||||
```
|
@ -1,23 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [(constructor)](./puppeteer.framemanager._constructor_.md)
|
||||
|
||||
## FrameManager.(constructor)
|
||||
|
||||
Constructs a new instance of the `FrameManager` class
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
constructor(client: CDPSession, page: Page, ignoreHTTPSErrors: boolean, timeoutSettings: TimeoutSettings);
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| client | [CDPSession](./puppeteer.cdpsession.md) | |
|
||||
| page | [Page](./puppeteer.page.md) | |
|
||||
| ignoreHTTPSErrors | boolean | |
|
||||
| timeoutSettings | TimeoutSettings | |
|
||||
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_contextIdToContext](./puppeteer.framemanager._contextidtocontext.md)
|
||||
|
||||
## FrameManager.\_contextIdToContext property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_contextIdToContext: Map<number, ExecutionContext>;
|
||||
```
|
@ -1,22 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_ensureIsolatedWorld](./puppeteer.framemanager._ensureisolatedworld.md)
|
||||
|
||||
## FrameManager.\_ensureIsolatedWorld() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_ensureIsolatedWorld(name: string): Promise<void>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| name | string | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
Promise<void>
|
||||
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_frames](./puppeteer.framemanager._frames.md)
|
||||
|
||||
## FrameManager.\_frames property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_frames: Map<string, Frame>;
|
||||
```
|
@ -1,22 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_handleFrameTree](./puppeteer.framemanager._handleframetree.md)
|
||||
|
||||
## FrameManager.\_handleFrameTree() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_handleFrameTree(frameTree: Protocol.Page.FrameTree): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| frameTree | Protocol.Page.FrameTree | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_isolatedWorlds](./puppeteer.framemanager._isolatedworlds.md)
|
||||
|
||||
## FrameManager.\_isolatedWorlds property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_isolatedWorlds: Set<string>;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_mainFrame](./puppeteer.framemanager._mainframe.md)
|
||||
|
||||
## FrameManager.\_mainFrame property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_mainFrame: Frame;
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_networkManager](./puppeteer.framemanager._networkmanager.md)
|
||||
|
||||
## FrameManager.\_networkManager property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_networkManager: NetworkManager;
|
||||
```
|
@ -1,22 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_onExecutionContextCreated](./puppeteer.framemanager._onexecutioncontextcreated.md)
|
||||
|
||||
## FrameManager.\_onExecutionContextCreated() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_onExecutionContextCreated(contextPayload: Protocol.Runtime.ExecutionContextDescription): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| contextPayload | Protocol.Runtime.ExecutionContextDescription | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -1,22 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_onExecutionContextDestroyed](./puppeteer.framemanager._onexecutioncontextdestroyed.md)
|
||||
|
||||
## FrameManager.\_onExecutionContextDestroyed() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_onExecutionContextDestroyed(executionContextId: number): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| executionContextId | number | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -1,15 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_onExecutionContextsCleared](./puppeteer.framemanager._onexecutioncontextscleared.md)
|
||||
|
||||
## FrameManager.\_onExecutionContextsCleared() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_onExecutionContextsCleared(): void;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -1,23 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_onFrameAttached](./puppeteer.framemanager._onframeattached.md)
|
||||
|
||||
## FrameManager.\_onFrameAttached() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_onFrameAttached(frameId: string, parentFrameId?: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| frameId | string | |
|
||||
| parentFrameId | string | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -1,22 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_onFrameDetached](./puppeteer.framemanager._onframedetached.md)
|
||||
|
||||
## FrameManager.\_onFrameDetached() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_onFrameDetached(frameId: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| frameId | string | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -1,22 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_onFrameNavigated](./puppeteer.framemanager._onframenavigated.md)
|
||||
|
||||
## FrameManager.\_onFrameNavigated() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_onFrameNavigated(framePayload: Protocol.Page.Frame): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| framePayload | Protocol.Page.Frame | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -1,23 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_onFrameNavigatedWithinDocument](./puppeteer.framemanager._onframenavigatedwithindocument.md)
|
||||
|
||||
## FrameManager.\_onFrameNavigatedWithinDocument() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_onFrameNavigatedWithinDocument(frameId: string, url: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| frameId | string | |
|
||||
| url | string | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -1,22 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_onFrameStoppedLoading](./puppeteer.framemanager._onframestoppedloading.md)
|
||||
|
||||
## FrameManager.\_onFrameStoppedLoading() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_onFrameStoppedLoading(frameId: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| frameId | string | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -1,22 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_onLifecycleEvent](./puppeteer.framemanager._onlifecycleevent.md)
|
||||
|
||||
## FrameManager.\_onLifecycleEvent() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_onLifecycleEvent(event: Protocol.Page.lifecycleEventPayload): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| event | Protocol.Page.lifecycleEventPayload | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_page](./puppeteer.framemanager._page.md)
|
||||
|
||||
## FrameManager.\_page property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_page: Page;
|
||||
```
|
@ -1,22 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_removeFramesRecursively](./puppeteer.framemanager._removeframesrecursively.md)
|
||||
|
||||
## FrameManager.\_removeFramesRecursively() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_removeFramesRecursively(frame: Frame): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| frame | [Frame](./puppeteer.frame.md) | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -1,11 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [\_timeoutSettings](./puppeteer.framemanager._timeoutsettings.md)
|
||||
|
||||
## FrameManager.\_timeoutSettings property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
_timeoutSettings: TimeoutSettings;
|
||||
```
|
@ -1,22 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [executionContextById](./puppeteer.framemanager.executioncontextbyid.md)
|
||||
|
||||
## FrameManager.executionContextById() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
executionContextById(contextId: number): ExecutionContext;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| contextId | number | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
[ExecutionContext](./puppeteer.executioncontext.md)
|
||||
|
@ -1,22 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [frame](./puppeteer.framemanager.frame.md)
|
||||
|
||||
## FrameManager.frame() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
frame(frameId: string): Frame | null;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| frameId | string | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
[Frame](./puppeteer.frame.md) \| null
|
||||
|
@ -1,15 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [frames](./puppeteer.framemanager.frames.md)
|
||||
|
||||
## FrameManager.frames() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
frames(): Frame[];
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
[Frame](./puppeteer.frame.md)<!-- -->\[\]
|
||||
|
@ -1,15 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [initialize](./puppeteer.framemanager.initialize.md)
|
||||
|
||||
## FrameManager.initialize() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
initialize(): Promise<void>;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
Promise<void>
|
||||
|
@ -1,15 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [mainFrame](./puppeteer.framemanager.mainframe.md)
|
||||
|
||||
## FrameManager.mainFrame() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
mainFrame(): Frame;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
[Frame](./puppeteer.frame.md)
|
||||
|
@ -1,58 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md)
|
||||
|
||||
## FrameManager class
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare class FrameManager extends EventEmitter
|
||||
```
|
||||
<b>Extends:</b> [EventEmitter](./puppeteer.eventemitter.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
| Constructor | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [(constructor)(client, page, ignoreHTTPSErrors, timeoutSettings)](./puppeteer.framemanager._constructor_.md) | | Constructs a new instance of the <code>FrameManager</code> class |
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [\_client](./puppeteer.framemanager._client.md) | | [CDPSession](./puppeteer.cdpsession.md) | |
|
||||
| [\_contextIdToContext](./puppeteer.framemanager._contextidtocontext.md) | | Map<number, [ExecutionContext](./puppeteer.executioncontext.md)<!-- -->> | |
|
||||
| [\_frames](./puppeteer.framemanager._frames.md) | | Map<string, [Frame](./puppeteer.frame.md)<!-- -->> | |
|
||||
| [\_isolatedWorlds](./puppeteer.framemanager._isolatedworlds.md) | | Set<string> | |
|
||||
| [\_mainFrame](./puppeteer.framemanager._mainframe.md) | | [Frame](./puppeteer.frame.md) | |
|
||||
| [\_networkManager](./puppeteer.framemanager._networkmanager.md) | | NetworkManager | |
|
||||
| [\_page](./puppeteer.framemanager._page.md) | | [Page](./puppeteer.page.md) | |
|
||||
| [\_timeoutSettings](./puppeteer.framemanager._timeoutsettings.md) | | TimeoutSettings | |
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [\_ensureIsolatedWorld(name)](./puppeteer.framemanager._ensureisolatedworld.md) | | |
|
||||
| [\_handleFrameTree(frameTree)](./puppeteer.framemanager._handleframetree.md) | | |
|
||||
| [\_onExecutionContextCreated(contextPayload)](./puppeteer.framemanager._onexecutioncontextcreated.md) | | |
|
||||
| [\_onExecutionContextDestroyed(executionContextId)](./puppeteer.framemanager._onexecutioncontextdestroyed.md) | | |
|
||||
| [\_onExecutionContextsCleared()](./puppeteer.framemanager._onexecutioncontextscleared.md) | | |
|
||||
| [\_onFrameAttached(frameId, parentFrameId)](./puppeteer.framemanager._onframeattached.md) | | |
|
||||
| [\_onFrameDetached(frameId)](./puppeteer.framemanager._onframedetached.md) | | |
|
||||
| [\_onFrameNavigated(framePayload)](./puppeteer.framemanager._onframenavigated.md) | | |
|
||||
| [\_onFrameNavigatedWithinDocument(frameId, url)](./puppeteer.framemanager._onframenavigatedwithindocument.md) | | |
|
||||
| [\_onFrameStoppedLoading(frameId)](./puppeteer.framemanager._onframestoppedloading.md) | | |
|
||||
| [\_onLifecycleEvent(event)](./puppeteer.framemanager._onlifecycleevent.md) | | |
|
||||
| [\_removeFramesRecursively(frame)](./puppeteer.framemanager._removeframesrecursively.md) | | |
|
||||
| [executionContextById(contextId)](./puppeteer.framemanager.executioncontextbyid.md) | | |
|
||||
| [frame(frameId)](./puppeteer.framemanager.frame.md) | | |
|
||||
| [frames()](./puppeteer.framemanager.frames.md) | | |
|
||||
| [initialize()](./puppeteer.framemanager.initialize.md) | | |
|
||||
| [mainFrame()](./puppeteer.framemanager.mainframe.md) | | |
|
||||
| [navigateFrame(frame, url, options)](./puppeteer.framemanager.navigateframe.md) | | |
|
||||
| [networkManager()](./puppeteer.framemanager.networkmanager.md) | | |
|
||||
| [page()](./puppeteer.framemanager.page.md) | | |
|
||||
| [waitForFrameNavigation(frame, options)](./puppeteer.framemanager.waitforframenavigation.md) | | |
|
||||
|
@ -1,28 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [navigateFrame](./puppeteer.framemanager.navigateframe.md)
|
||||
|
||||
## FrameManager.navigateFrame() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
navigateFrame(frame: Frame, url: string, options?: {
|
||||
referer?: string;
|
||||
timeout?: number;
|
||||
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
||||
}): Promise<HTTPResponse | null>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| frame | [Frame](./puppeteer.frame.md) | |
|
||||
| url | string | |
|
||||
| options | { referer?: string; timeout?: number; waitUntil?: PuppeteerLifeCycleEvent \| PuppeteerLifeCycleEvent\[\]; } | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
Promise<[HTTPResponse](./puppeteer.httpresponse.md) \| null>
|
||||
|
@ -1,15 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [networkManager](./puppeteer.framemanager.networkmanager.md)
|
||||
|
||||
## FrameManager.networkManager() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
networkManager(): NetworkManager;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
NetworkManager
|
||||
|
@ -1,15 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [page](./puppeteer.framemanager.page.md)
|
||||
|
||||
## FrameManager.page() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
page(): Page;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
[Page](./puppeteer.page.md)
|
||||
|
@ -1,26 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [FrameManager](./puppeteer.framemanager.md) > [waitForFrameNavigation](./puppeteer.framemanager.waitforframenavigation.md)
|
||||
|
||||
## FrameManager.waitForFrameNavigation() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
waitForFrameNavigation(frame: Frame, options?: {
|
||||
timeout?: number;
|
||||
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
||||
}): Promise<HTTPResponse | null>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| frame | [Frame](./puppeteer.frame.md) | |
|
||||
| options | { timeout?: number; waitUntil?: PuppeteerLifeCycleEvent \| PuppeteerLifeCycleEvent\[\]; } | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
Promise<[HTTPResponse](./puppeteer.httpresponse.md) \| null>
|
||||
|
@ -22,7 +22,6 @@
|
||||
| [ExecutionContext](./puppeteer.executioncontext.md) | This class represents a context for JavaScript execution. A \[Page\] might have many execution contexts: - each [frame](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe) has "default" execution context that is always created after frame is attached to DOM. This context is returned by the method. - [Extension](https://developer.chrome.com/extensions)<!-- -->'s content scripts create additional execution contexts.<!-- -->Besides pages, execution contexts can be found in [workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API)<!-- -->. |
|
||||
| [FileChooser](./puppeteer.filechooser.md) | File choosers let you react to the page requesting for a file. |
|
||||
| [Frame](./puppeteer.frame.md) | |
|
||||
| [FrameManager](./puppeteer.framemanager.md) | |
|
||||
| [HTTPRequest](./puppeteer.httprequest.md) | |
|
||||
| [HTTPResponse](./puppeteer.httpresponse.md) | The HTTPResponse class represents responses which are received by the [Page](./puppeteer.page.md) class. |
|
||||
| [JSHandle](./puppeteer.jshandle.md) | Represents an in-page JavaScript object. JSHandles can be created with the [page.evaluateHandle](./puppeteer.page.evaluatehandle.md) method. |
|
||||
@ -56,6 +55,7 @@
|
||||
| [ClickOptions](./puppeteer.clickoptions.md) | |
|
||||
| [ConsoleMessageLocation](./puppeteer.consolemessagelocation.md) | |
|
||||
| [CoverageEntry](./puppeteer.coverageentry.md) | The CoverageEntry class represents one entry of the coverage report. |
|
||||
| [Credentials](./puppeteer.credentials.md) | |
|
||||
| [CSSCoverageOptions](./puppeteer.csscoverageoptions.md) | Set of configurable options for CSS coverage. |
|
||||
| [GeolocationOptions](./puppeteer.geolocationoptions.md) | |
|
||||
| [JSCoverageOptions](./puppeteer.jscoverageoptions.md) | Set of configurable options for JS coverage. |
|
||||
@ -70,6 +70,7 @@
|
||||
| [SnapshotOptions](./puppeteer.snapshotoptions.md) | |
|
||||
| [TracingOptions](./puppeteer.tracingoptions.md) | |
|
||||
| [WaitForOptions](./puppeteer.waitforoptions.md) | |
|
||||
| [WaitForSelectorOptions](./puppeteer.waitforselectoroptions.md) | |
|
||||
| [WaitForTargetOptions](./puppeteer.waitfortargetoptions.md) | |
|
||||
| [WaitTimeoutOptions](./puppeteer.waittimeoutoptions.md) | |
|
||||
|
||||
|
@ -14,7 +14,7 @@ authenticate(credentials: Credentials): Promise<void>;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| credentials | Credentials | |
|
||||
| credentials | [Credentials](./puppeteer.credentials.md) | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
11
new-docs/puppeteer.waitforselectoroptions.hidden.md
Normal file
11
new-docs/puppeteer.waitforselectoroptions.hidden.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [WaitForSelectorOptions](./puppeteer.waitforselectoroptions.md) > [hidden](./puppeteer.waitforselectoroptions.hidden.md)
|
||||
|
||||
## WaitForSelectorOptions.hidden property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
hidden?: boolean;
|
||||
```
|
21
new-docs/puppeteer.waitforselectoroptions.md
Normal file
21
new-docs/puppeteer.waitforselectoroptions.md
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [WaitForSelectorOptions](./puppeteer.waitforselectoroptions.md)
|
||||
|
||||
## WaitForSelectorOptions interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface WaitForSelectorOptions
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [hidden](./puppeteer.waitforselectoroptions.hidden.md) | boolean | |
|
||||
| [timeout](./puppeteer.waitforselectoroptions.timeout.md) | number | |
|
||||
| [visible](./puppeteer.waitforselectoroptions.visible.md) | boolean | |
|
||||
|
11
new-docs/puppeteer.waitforselectoroptions.timeout.md
Normal file
11
new-docs/puppeteer.waitforselectoroptions.timeout.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [WaitForSelectorOptions](./puppeteer.waitforselectoroptions.md) > [timeout](./puppeteer.waitforselectoroptions.timeout.md)
|
||||
|
||||
## WaitForSelectorOptions.timeout property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
timeout?: number;
|
||||
```
|
11
new-docs/puppeteer.waitforselectoroptions.visible.md
Normal file
11
new-docs/puppeteer.waitforselectoroptions.visible.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [WaitForSelectorOptions](./puppeteer.waitforselectoroptions.md) > [visible](./puppeteer.waitforselectoroptions.visible.md)
|
||||
|
||||
## WaitForSelectorOptions.visible property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
visible?: boolean;
|
||||
```
|
@ -33,6 +33,7 @@ export * from './common/ConsoleMessage';
|
||||
export * from './common/Coverage';
|
||||
export * from './common/DeviceDescriptors';
|
||||
export * from './common/Dialog';
|
||||
export * from './common/DOMWorld';
|
||||
export * from './common/JSHandle';
|
||||
export * from './common/ExecutionContext';
|
||||
export * from './common/EventEmitter';
|
||||
@ -49,6 +50,7 @@ export * from './common/SecurityDetails';
|
||||
export * from './common/Target';
|
||||
export * from './common/Errors';
|
||||
export * from './common/Tracing';
|
||||
export * from './common/NetworkManager';
|
||||
export * from './common/WebWorker';
|
||||
export * from './common/USKeyboardLayout';
|
||||
export * from './common/EvalTypes';
|
||||
|
@ -36,12 +36,18 @@ import { isNode } from '../environment';
|
||||
// when it is used in the predicate function below.
|
||||
declare const predicateQueryHandler: QueryHandler;
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface WaitForSelectorOptions {
|
||||
visible?: boolean;
|
||||
hidden?: boolean;
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export class DOMWorld {
|
||||
_frameManager: FrameManager;
|
||||
_frame: Frame;
|
||||
|
@ -38,15 +38,18 @@ import {
|
||||
|
||||
const UTILITY_WORLD_NAME = '__puppeteer_utility_world__';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export class FrameManager extends EventEmitter {
|
||||
_client: CDPSession;
|
||||
_page: Page;
|
||||
_networkManager: NetworkManager;
|
||||
private _page: Page;
|
||||
private _networkManager: NetworkManager;
|
||||
_timeoutSettings: TimeoutSettings;
|
||||
_frames = new Map<string, Frame>();
|
||||
_contextIdToContext = new Map<number, ExecutionContext>();
|
||||
_isolatedWorlds = new Set<string>();
|
||||
_mainFrame: Frame;
|
||||
private _frames = new Map<string, Frame>();
|
||||
private _contextIdToContext = new Map<number, ExecutionContext>();
|
||||
private _isolatedWorlds = new Set<string>();
|
||||
private _mainFrame: Frame;
|
||||
|
||||
constructor(
|
||||
client: CDPSession,
|
||||
@ -234,7 +237,7 @@ export class FrameManager extends EventEmitter {
|
||||
if (this._frames.has(frameId)) return;
|
||||
assert(parentFrameId);
|
||||
const parentFrame = this._frames.get(parentFrameId);
|
||||
const frame = new Frame(this, this._client, parentFrame, frameId);
|
||||
const frame = new Frame(this, parentFrame, frameId);
|
||||
this._frames.set(frame._id, frame);
|
||||
this.emit(Events.FrameManager.FrameAttached, frame);
|
||||
}
|
||||
@ -263,7 +266,7 @@ export class FrameManager extends EventEmitter {
|
||||
frame._id = framePayload.id;
|
||||
} else {
|
||||
// Initial main frame navigation.
|
||||
frame = new Frame(this, this._client, null, framePayload.id);
|
||||
frame = new Frame(this, null, framePayload.id);
|
||||
}
|
||||
this._frames.set(framePayload.id, frame);
|
||||
this._mainFrame = frame;
|
||||
@ -335,17 +338,14 @@ export class FrameManager extends EventEmitter {
|
||||
this._contextIdToContext.set(contextPayload.id, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} executionContextId
|
||||
*/
|
||||
_onExecutionContextDestroyed(executionContextId: number): void {
|
||||
private _onExecutionContextDestroyed(executionContextId: number): void {
|
||||
const context = this._contextIdToContext.get(executionContextId);
|
||||
if (!context) return;
|
||||
this._contextIdToContext.delete(executionContextId);
|
||||
if (context._world) context._world._setContext(null);
|
||||
}
|
||||
|
||||
_onExecutionContextsCleared(): void {
|
||||
private _onExecutionContextsCleared(): void {
|
||||
for (const context of this._contextIdToContext.values()) {
|
||||
if (context._world) context._world._setContext(null);
|
||||
}
|
||||
@ -358,7 +358,7 @@ export class FrameManager extends EventEmitter {
|
||||
return context;
|
||||
}
|
||||
|
||||
_removeFramesRecursively(frame: Frame): void {
|
||||
private _removeFramesRecursively(frame: Frame): void {
|
||||
for (const child of frame.childFrames())
|
||||
this._removeFramesRecursively(child);
|
||||
frame._detach();
|
||||
@ -367,30 +367,57 @@ export class FrameManager extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export class Frame {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
_frameManager: FrameManager;
|
||||
_client: CDPSession;
|
||||
_parentFrame?: Frame;
|
||||
private _parentFrame?: Frame;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
_id: string;
|
||||
|
||||
_url = '';
|
||||
_detached = false;
|
||||
private _url = '';
|
||||
private _detached = false;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
_loaderId = '';
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
_name?: string;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
_lifecycleEvents = new Set<string>();
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
_mainWorld: DOMWorld;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
_secondaryWorld: DOMWorld;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
_childFrames: Set<Frame>;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
constructor(
|
||||
frameManager: FrameManager,
|
||||
client: CDPSession,
|
||||
parentFrame: Frame | null,
|
||||
frameId: string
|
||||
) {
|
||||
this._frameManager = frameManager;
|
||||
this._client = client;
|
||||
this._parentFrame = parentFrame;
|
||||
this._url = '';
|
||||
this._id = frameId;
|
||||
|
@ -23,11 +23,17 @@ import { FrameManager } from './FrameManager';
|
||||
import { HTTPRequest } from './HTTPRequest';
|
||||
import { HTTPResponse } from './HTTPResponse';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface Credentials {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export class NetworkManager extends EventEmitter {
|
||||
_client: CDPSession;
|
||||
_ignoreHTTPSErrors: boolean;
|
||||
@ -183,9 +189,6 @@ export class NetworkManager extends EventEmitter {
|
||||
this._onRequest(event, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {!Protocol.Fetch.authRequiredPayload} event
|
||||
*/
|
||||
_onAuthRequired(event: Protocol.Fetch.authRequiredPayload): void {
|
||||
/* TODO(jacktfranklin): This is defined in protocol.d.ts but not
|
||||
* in an easily referrable way - we should look at exposing it.
|
||||
|
Loading…
Reference in New Issue
Block a user