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.
fun addBinding(input: AddBindingRequest): Single<ResponseFrame>
If executionContextId is empty, adds binding with the given name on the global objects of all inspected contexts, including those created later, bindings survive reloads. If executionContextId is specified, adds binding only on global object of given execution context. Binding function takes exactly one argument, this argument should be string, in case of any other input, function throws an exception. Each binding function call produces Runtime.bindingCalled notification. |
|
fun awaitPromise(input: AwaitPromiseRequest): Single<AwaitPromiseResponse>
Add handler to promise with given promise object id. |
|
fun bindingCalled(): Flowable<BindingCalledEvent>
Notification is issued every time when binding is called. |
|
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. |
|
fun compileScript(input: CompileScriptRequest): Single<CompileScriptResponse>
Compiles expression. |
|
fun consoleAPICalled(): Flowable<ConsoleAPICalledEvent>
Issued when console API was called. |
|
fun disable(): Single<ResponseFrame>
Disables reporting of execution contexts creation. |
|
fun discardConsoleEntries(): Single<ResponseFrame>
Discards collected exceptions and console API calls. |
|
fun enable(): Single<ResponseFrame>
Enables reporting of execution contexts creation by means of |
|
fun evaluate(input: EvaluateRequest): Single<EvaluateResponse>
Evaluates expression on global object. |
|
fun events(): Flowable<Event>
Returns flowable capturing all Runtime domains events. |
|
fun exceptionRevoked(): Flowable<ExceptionRevokedEvent>
Issued when unhandled exception was revoked. |
|
fun exceptionThrown(): Flowable<ExceptionThrownEvent>
Issued when exception was thrown and unhandled. |
|
fun executionContextCreated(): Flowable<ExecutionContextCreatedEvent>
Issued when new execution context is created. |
|
fun executionContextDestroyed(): Flowable<ExecutionContextDestroyedEvent>
Issued when execution context is destroyed. |
|
fun executionContextsCleared(): Flowable<Event>
Issued when all executionContexts were cleared in browser |
|
fun getHeapUsage(): Single<GetHeapUsageResponse>
Returns the JavaScript heap usage. It is the total usage of the corresponding isolate not scoped to a particular Runtime. |
|
fun getIsolateId(): Single<GetIsolateIdResponse>
Returns the isolate id. |
|
fun getProperties(input: GetPropertiesRequest): Single<GetPropertiesResponse>
Returns properties of a given object. Object group of the result is inherited from the target object. |
|
fun globalLexicalScopeNames(input: GlobalLexicalScopeNamesRequest): Single<GlobalLexicalScopeNamesResponse>
Returns all let, const and class variables from global scope. |
|
fun inspectRequested(): Flowable<InspectRequestedEvent>
Issued when object should be inspected (for example, as a result of inspect() command line API call). |
|
fun queryObjects(input: QueryObjectsRequest): Single<QueryObjectsResponse> |
|
fun releaseObject(input: ReleaseObjectRequest): Single<ResponseFrame>
Releases remote object with given id. |
|
fun releaseObjectGroup(input: ReleaseObjectGroupRequest): Single<ResponseFrame>
Releases all remote objects that belong to a given group. |
|
fun removeBinding(input: RemoveBindingRequest): Single<ResponseFrame>
This method does not remove binding function from global object but unsubscribes current runtime agent from Runtime.bindingCalled notifications. |
|
fun runIfWaitingForDebugger(): Single<ResponseFrame>
Tells inspected instance to run if it was waiting for debugger to attach. |
|
fun runScript(input: RunScriptRequest): Single<RunScriptResponse>
Runs script with given id in a given context. |
|
fun setAsyncCallStackDepth(input: SetAsyncCallStackDepthRequest): Single<ResponseFrame>
Enables or disables async call stacks tracking. |
|
fun setCustomObjectFormatterEnabled(input: SetCustomObjectFormatterEnabledRequest): Single<ResponseFrame> |
|
fun setMaxCallStackSizeToCapture(input: SetMaxCallStackSizeToCaptureRequest): Single<ResponseFrame> |
|
fun terminateExecution(): Single<ResponseFrame>
Terminate current or next JavaScript execution. Will cancel the termination when the outer-most script execution ends. |