Home Reference Source
public class | source

Worker

Extends:

eventemitter3~EventEmitter → Worker

Constructor Summary

Public Constructor
public

constructor(client: Chrome | CRIConnection | CDPSession | Object, url: string, consoleAPICalled: *, exceptionThrown: function(arg: Object): void)

Member Summary

Private Members
private
private
private

Method Summary

Public Methods
public

async evaluate(pageFunction: Function | string, args: ...*): Promise<*>

public

async evaluateHandle(pageFunction: Function | string, args: ...*): Promise<JSHandle>

public
public

toJSON(): {url: string}

public

url(): string

Public Constructors

public constructor(client: Chrome | CRIConnection | CDPSession | Object, url: string, consoleAPICalled: *, exceptionThrown: function(arg: Object): void) source

Params:

NameTypeAttributeDescription
client Chrome | CRIConnection | CDPSession | Object
url string
consoleAPICalled *
exceptionThrown function(arg: Object): void

Private Members

private _client: Chrome | CRIConnection | CDPSession | Object source

private _executionContextPromise: Promise<ExecutionContext> source

private _url: string source

Public Methods

public async evaluate(pageFunction: Function | string, args: ...*): Promise<*> source

Params:

NameTypeAttributeDescription
pageFunction Function | string
args ...*

Return:

Promise<*>

public async evaluateHandle(pageFunction: Function | string, args: ...*): Promise<JSHandle> source

Params:

NameTypeAttributeDescription
pageFunction Function | string
args ...*

Return:

Promise<JSHandle>

public executionContext(): Promise<ExecutionContext> source

public toJSON(): {url: string} source

Return:

{url: string}

public url(): string source

Return:

string