import FrameManager from 'chrome-remote-interface-extra/lib/frames/FrameManager.js'
FrameManager
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(client: Chrome | CRIConnection | CDPSession | Object, frameTree: Object, timeoutSettings: TimeoutSettings, networkManager: NetworkManager, page: Page) |
Member Summary
Private Members | ||
private |
_client: Chrome | CRIConnection | CDPSession | Object |
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
async ensureSecondaryDOMWorld() |
|
public |
executionContextById(contextId: number): ExecutionContext |
since chrome-remote-interface-extra |
public |
|
|
public |
|
|
public |
async getFrameResourceContent(frameId: string, url: string): Promise<Buffer> Returns content of the given resource. |
since chrome-remote-interface-extra |
public |
async getResourceTree(): Promise<FrameResourceTree> |
since chrome-remote-interface-extra |
public |
|
|
public |
async navigateFrame(frame: Frame, url: string, options: {referer?: string, timeout?: number, waitUntil?: string|Array<string>, transitionType?: string}=): Promise<Response|undefined> |
|
public |
|
|
public |
toJSON(): {"mainFrame": *, "frames": *} |
|
public |
async waitForFrameNavigation(frame: Frame, options: {timeout?: number, waitUntil?: string|Array<string>}=): Promise<Response|undefined> |
Private Methods | ||
private |
async _ensureIsolatedWorld(name: string) |
|
private |
_handleFrameTree(frameTree: Object, first: boolean) |
|
private |
async _navigate(navigationParams: {transitionType: ?string, frameId: string, url: string, referrer: ?string}, endnObj: {ensureNewDocumentNavigation: boolean}): Promise<Error|undefined> |
since chrome-remote-interface-extra |
private |
_onExecutionContextCreated(event: Object) |
|
private |
_onExecutionContextDestroyed(event: Object) |
|
private |
|
|
private |
_onFrameAttached(event: Object) |
|
private |
_onFrameDetached(event: Object) |
|
private |
_onFrameNavigated(event: Object) |
|
private |
|
|
private |
_onFrameStoppedLoading(event: Object) |
|
private |
_onLifecycleEvent(event: Object) |
|
private |
_removeFramesRecursively(frame: Frame) |
Public Constructors
public constructor(client: Chrome | CRIConnection | CDPSession | Object, frameTree: Object, timeoutSettings: TimeoutSettings, networkManager: NetworkManager, page: Page) source
Params:
Name | Type | Attribute | Description |
client | Chrome | CRIConnection | CDPSession | Object | ||
frameTree | Object |
|
|
timeoutSettings | TimeoutSettings |
|
|
networkManager | NetworkManager |
|
|
page | Page |
|
Private Members
private _client: Chrome | CRIConnection | CDPSession | Object source
private _contextIdToContext: Map<number, ExecutionContext> source
private _networkManager: NetworkManager source
private _timeoutSettings: TimeoutSettings source
Public Methods
public async ensureSecondaryDOMWorld() source
public executionContextById(contextId: number): ExecutionContext since chrome-remote-interface-extra source
Params:
Name | Type | Attribute | Description |
contextId | number |
public frame(frameId: string): Frame source
Params:
Name | Type | Attribute | Description |
frameId | string |
|
public async getFrameResourceContent(frameId: string, url: string): Promise<Buffer> since chrome-remote-interface-extra source
Returns content of the given resource. EXPERIMENTAL
public async getResourceTree(): Promise<FrameResourceTree> since chrome-remote-interface-extra source
public async navigateFrame(frame: Frame, url: string, options: {referer?: string, timeout?: number, waitUntil?: string|Array<string>, transitionType?: string}=): Promise<Response|undefined> source
public async waitForFrameNavigation(frame: Frame, options: {timeout?: number, waitUntil?: string|Array<string>}=): Promise<Response|undefined> source
Params:
Name | Type | Attribute | Description |
frame | Frame |
|
|
options | {timeout?: number, waitUntil?: string|Array<string>}= |
|
Private Methods
private async _ensureIsolatedWorld(name: string) source
Params:
Name | Type | Attribute | Description |
name | string |
private async _navigate(navigationParams: {transitionType: ?string, frameId: string, url: string, referrer: ?string}, endnObj: {ensureNewDocumentNavigation: boolean}): Promise<Error|undefined> since chrome-remote-interface-extra source
private _onExecutionContextCreated(event: Object) source
Params:
Name | Type | Attribute | Description |
event | Object |
|
private _onExecutionContextDestroyed(event: Object) source
Params:
Name | Type | Attribute | Description |
event | Object |
|
private _onExecutionContextsCleared() source
private _onFrameAttached(event: Object) source
Params:
Name | Type | Attribute | Description |
event | Object |
|
private _onFrameDetached(event: Object) source
Params:
Name | Type | Attribute | Description |
event | Object |
|
private _onFrameNavigated(event: Object) source
Params:
Name | Type | Attribute | Description |
event | Object |
|
private _onFrameNavigatedWithinDocument(event: Object) source
Params:
Name | Type | Attribute | Description |
event | Object |
|
private _onFrameStoppedLoading(event: Object) source
Params:
Name | Type | Attribute | Description |
event | Object |
|