pl.wendigo.chrome.api.runtime / RuntimeOperations

RuntimeOperations

class RuntimeOperations (source)

Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.

Link
Protocol Runtime domain documentation.

Functions

awaitPromise

fun awaitPromise(input: AwaitPromiseRequest): Single<AwaitPromiseResponse>

Add handler to promise with given promise object id.

callFunctionOn

fun callFunctionOn(input: CallFunctionOnRequest): Single<CallFunctionOnResponse>

Calls function with given declaration on the given object. Object group of the result is inherited from the target object.

compileScript

fun compileScript(input: CompileScriptRequest): Single<CompileScriptResponse>

Compiles expression.

consoleAPICalled

fun consoleAPICalled(): Flowable<ConsoleAPICalledEvent>

Issued when console API was called.

consoleAPICalledTimed

fun consoleAPICalledTimed(): Flowable<Timed<ConsoleAPICalledEvent>>

Issued when console API was called.

disable

fun disable(): Single<ResponseFrame>

Disables reporting of execution contexts creation.

discardConsoleEntries

fun discardConsoleEntries(): Single<ResponseFrame>

Discards collected exceptions and console API calls.

enable

fun enable(): Single<ResponseFrame>

Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context.

evaluate

fun evaluate(input: EvaluateRequest): Single<EvaluateResponse>

Evaluates expression on global object.

events

fun events(): Flowable<Event>

Returns flowable capturing all Runtime domains events.

exceptionRevoked

fun exceptionRevoked(): Flowable<ExceptionRevokedEvent>

Issued when unhandled exception was revoked.

exceptionRevokedTimed

fun exceptionRevokedTimed(): Flowable<Timed<ExceptionRevokedEvent>>

Issued when unhandled exception was revoked.

exceptionThrown

fun exceptionThrown(): Flowable<ExceptionThrownEvent>

Issued when exception was thrown and unhandled.

exceptionThrownTimed

fun exceptionThrownTimed(): Flowable<Timed<ExceptionThrownEvent>>

Issued when exception was thrown and unhandled.

executionContextCreated

fun executionContextCreated(): Flowable<ExecutionContextCreatedEvent>

Issued when new execution context is created.

executionContextCreatedTimed

fun executionContextCreatedTimed(): Flowable<Timed<ExecutionContextCreatedEvent>>

Issued when new execution context is created.

executionContextDestroyed

fun executionContextDestroyed(): Flowable<ExecutionContextDestroyedEvent>

Issued when execution context is destroyed.

executionContextDestroyedTimed

fun executionContextDestroyedTimed(): Flowable<Timed<ExecutionContextDestroyedEvent>>

Issued when execution context is destroyed.

executionContextsCleared

fun executionContextsCleared(): Flowable<Event>

Issued when all executionContexts were cleared in browser

executionContextsClearedTimed

fun executionContextsClearedTimed(): Flowable<Timed<Event>>

Issued when all executionContexts were cleared in browser

getProperties

fun getProperties(input: GetPropertiesRequest): Single<GetPropertiesResponse>

Returns properties of a given object. Object group of the result is inherited from the target object.

inspectRequested

fun inspectRequested(): Flowable<InspectRequestedEvent>

Issued when object should be inspected (for example, as a result of inspect() command line API call).

inspectRequestedTimed

fun inspectRequestedTimed(): Flowable<Timed<InspectRequestedEvent>>

Issued when object should be inspected (for example, as a result of inspect() command line API call).

releaseObject

fun releaseObject(input: ReleaseObjectRequest): Single<ResponseFrame>

Releases remote object with given id.

releaseObjectGroup

fun releaseObjectGroup(input: ReleaseObjectGroupRequest): Single<ResponseFrame>

Releases all remote objects that belong to a given group.

runIfWaitingForDebugger

fun runIfWaitingForDebugger(): Single<ResponseFrame>

Tells inspected instance to run if it was waiting for debugger to attach.

runScript

fun runScript(input: RunScriptRequest): Single<RunScriptResponse>

Runs script with given id in a given context.

setCustomObjectFormatterEnabled

fun setCustomObjectFormatterEnabled(input: SetCustomObjectFormatterEnabledRequest): Single<ResponseFrame>