Liking cljdoc? Tell your friends :D

clj-chrome-devtools.commands.runtime

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.

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.
raw docstring

await-promiseclj

(await-promise)
(await-promise {:as params
                :keys [promise-object-id return-by-value generate-preview]})
(await-promise connection
               {:as params
                :keys [promise-object-id return-by-value generate-preview]})

Add handler to promise with given promise object id.

Parameters map keys:

KeyDescription
:promise-object-idIdentifier of the promise.
:return-by-valueWhether the result is expected to be a JSON object that should be sent by value. (optional)
:generate-previewWhether preview should be generated for the result. (optional)

Return map keys:

KeyDescription
:resultPromise result. Will contain rejected value if promise was rejected.
:exception-detailsException details if stack strace is available. (optional)
Add handler to promise with given promise object id.

Parameters map keys:


  Key                | Description 
  -------------------|------------ 
  :promise-object-id | Identifier of the promise.
  :return-by-value   | Whether the result is expected to be a JSON object that should be sent by value. (optional)
  :generate-preview  | Whether preview should be generated for the result. (optional)

Return map keys:


  Key                | Description 
  -------------------|------------ 
  :result            | Promise result. Will contain rejected value if promise was rejected.
  :exception-details | Exception details if stack strace is available. (optional)
sourceraw docstring

call-function-onclj

(call-function-on)
(call-function-on {:as params
                   :keys [object-id function-declaration arguments silent
                          return-by-value generate-preview user-gesture
                          await-promise]})
(call-function-on connection
                  {:as params
                   :keys [object-id function-declaration arguments silent
                          return-by-value generate-preview user-gesture
                          await-promise]})

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

Parameters map keys:

KeyDescription
:object-idIdentifier of the object to call function on.
:function-declarationDeclaration of the function to call.
:argumentsCall arguments. All call arguments must belong to the same JavaScript world as the target object. (optional)
:silentIn silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. (optional)
:return-by-valueWhether the result is expected to be a JSON object which should be sent by value. (optional)
:generate-previewWhether preview should be generated for the result. (optional)
:user-gestureWhether execution should be treated as initiated by user in the UI. (optional)
:await-promiseWhether execution should await for resulting value and return once awaited promise is resolved. (optional)

Return map keys:

KeyDescription
:resultCall result.
:exception-detailsException details. (optional)
Calls function with given declaration on the given object. Object group of the result is inherited from the target object.

Parameters map keys:


  Key                   | Description 
  ----------------------|------------ 
  :object-id            | Identifier of the object to call function on.
  :function-declaration | Declaration of the function to call.
  :arguments            | Call arguments. All call arguments must belong to the same JavaScript world as the target object. (optional)
  :silent               | In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state. (optional)
  :return-by-value      | Whether the result is expected to be a JSON object which should be sent by value. (optional)
  :generate-preview     | Whether preview should be generated for the result. (optional)
  :user-gesture         | Whether execution should be treated as initiated by user in the UI. (optional)
  :await-promise        | Whether execution should `await` for resulting value and return once awaited promise is resolved. (optional)

Return map keys:


  Key                | Description 
  -------------------|------------ 
  :result            | Call result.
  :exception-details | Exception details. (optional)
sourceraw docstring

compile-scriptclj

(compile-script)
(compile-script {:as params
                 :keys [expression source-url persist-script
                        execution-context-id]})
(compile-script connection
                {:as params
                 :keys [expression source-url persist-script
                        execution-context-id]})

Compiles expression.

Parameters map keys:

KeyDescription
:expressionExpression to compile.
:source-urlSource url to be set for the script.
:persist-scriptSpecifies whether the compiled script should be persisted.
:execution-context-idSpecifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. (optional)

Return map keys:

KeyDescription
:script-idId of the script. (optional)
:exception-detailsException details. (optional)
Compiles expression.

Parameters map keys:


  Key                   | Description 
  ----------------------|------------ 
  :expression           | Expression to compile.
  :source-url           | Source url to be set for the script.
  :persist-script       | Specifies whether the compiled script should be persisted.
  :execution-context-id | Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. (optional)

Return map keys:


  Key                | Description 
  -------------------|------------ 
  :script-id         | Id of the script. (optional)
  :exception-details | Exception details. (optional)
sourceraw docstring

disableclj

(disable)
(disable {:as params :keys []})
(disable connection {:as params :keys []})

Disables reporting of execution contexts creation.

Disables reporting of execution contexts creation.
sourceraw docstring

discard-console-entriesclj

(discard-console-entries)
(discard-console-entries {:as params :keys []})
(discard-console-entries connection {:as params :keys []})

Discards collected exceptions and console API calls.

Discards collected exceptions and console API calls.
sourceraw docstring

enableclj

(enable)
(enable {:as params :keys []})
(enable connection {:as params :keys []})

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.

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.
sourceraw docstring

evaluateclj

(evaluate)
(evaluate {:as params
           :keys [expression object-group include-command-line-api silent
                  context-id return-by-value generate-preview user-gesture
                  await-promise]})
(evaluate connection
          {:as params
           :keys [expression object-group include-command-line-api silent
                  context-id return-by-value generate-preview user-gesture
                  await-promise]})

Evaluates expression on global object.

Parameters map keys:

KeyDescription
:expressionExpression to evaluate.
:object-groupSymbolic group name that can be used to release multiple objects. (optional)
:include-command-line-apiDetermines whether Command Line API should be available during the evaluation. (optional)
:silentIn silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. (optional)
:context-idSpecifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. (optional)
:return-by-valueWhether the result is expected to be a JSON object that should be sent by value. (optional)
:generate-previewWhether preview should be generated for the result. (optional)
:user-gestureWhether execution should be treated as initiated by user in the UI. (optional)
:await-promiseWhether execution should await for resulting value and return once awaited promise is resolved. (optional)

Return map keys:

KeyDescription
:resultEvaluation result.
:exception-detailsException details. (optional)
Evaluates expression on global object.

Parameters map keys:


  Key                       | Description 
  --------------------------|------------ 
  :expression               | Expression to evaluate.
  :object-group             | Symbolic group name that can be used to release multiple objects. (optional)
  :include-command-line-api | Determines whether Command Line API should be available during the evaluation. (optional)
  :silent                   | In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state. (optional)
  :context-id               | Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. (optional)
  :return-by-value          | Whether the result is expected to be a JSON object that should be sent by value. (optional)
  :generate-preview         | Whether preview should be generated for the result. (optional)
  :user-gesture             | Whether execution should be treated as initiated by user in the UI. (optional)
  :await-promise            | Whether execution should `await` for resulting value and return once awaited promise is resolved. (optional)

Return map keys:


  Key                | Description 
  -------------------|------------ 
  :result            | Evaluation result.
  :exception-details | Exception details. (optional)
sourceraw docstring

get-propertiesclj

(get-properties)
(get-properties {:as params
                 :keys [object-id own-properties accessor-properties-only
                        generate-preview]})
(get-properties connection
                {:as params
                 :keys [object-id own-properties accessor-properties-only
                        generate-preview]})

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

Parameters map keys:

KeyDescription
:object-idIdentifier of the object to return properties for.
:own-propertiesIf true, returns properties belonging only to the element itself, not to its prototype chain. (optional)
:accessor-properties-onlyIf true, returns accessor properties (with getter/setter) only; internal properties are not returned either. (optional)
:generate-previewWhether preview should be generated for the results. (optional)

Return map keys:

KeyDescription
:resultObject properties.
:internal-propertiesInternal object properties (only of the element itself). (optional)
:exception-detailsException details. (optional)
Returns properties of a given object. Object group of the result is inherited from the target object.

Parameters map keys:


  Key                       | Description 
  --------------------------|------------ 
  :object-id                | Identifier of the object to return properties for.
  :own-properties           | If true, returns properties belonging only to the element itself, not to its prototype chain. (optional)
  :accessor-properties-only | If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. (optional)
  :generate-preview         | Whether preview should be generated for the results. (optional)

Return map keys:


  Key                  | Description 
  ---------------------|------------ 
  :result              | Object properties.
  :internal-properties | Internal object properties (only of the element itself). (optional)
  :exception-details   | Exception details. (optional)
sourceraw docstring

release-objectclj

(release-object)
(release-object {:as params :keys [object-id]})
(release-object connection {:as params :keys [object-id]})

Releases remote object with given id.

Parameters map keys:

KeyDescription
:object-idIdentifier of the object to release.
Releases remote object with given id.

Parameters map keys:


  Key        | Description 
  -----------|------------ 
  :object-id | Identifier of the object to release.
sourceraw docstring

release-object-groupclj

(release-object-group)
(release-object-group {:as params :keys [object-group]})
(release-object-group connection {:as params :keys [object-group]})

Releases all remote objects that belong to a given group.

Parameters map keys:

KeyDescription
:object-groupSymbolic object group name.
Releases all remote objects that belong to a given group.

Parameters map keys:


  Key           | Description 
  --------------|------------ 
  :object-group | Symbolic object group name.
sourceraw docstring

run-if-waiting-for-debuggerclj

(run-if-waiting-for-debugger)
(run-if-waiting-for-debugger {:as params :keys []})
(run-if-waiting-for-debugger connection {:as params :keys []})

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

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

run-scriptclj

(run-script)
(run-script {:as params
             :keys [script-id execution-context-id object-group silent
                    include-command-line-api return-by-value generate-preview
                    await-promise]})
(run-script connection
            {:as params
             :keys [script-id execution-context-id object-group silent
                    include-command-line-api return-by-value generate-preview
                    await-promise]})

Runs script with given id in a given context.

Parameters map keys:

KeyDescription
:script-idId of the script to run.
:execution-context-idSpecifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. (optional)
:object-groupSymbolic group name that can be used to release multiple objects. (optional)
:silentIn silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. (optional)
:include-command-line-apiDetermines whether Command Line API should be available during the evaluation. (optional)
:return-by-valueWhether the result is expected to be a JSON object which should be sent by value. (optional)
:generate-previewWhether preview should be generated for the result. (optional)
:await-promiseWhether execution should await for resulting value and return once awaited promise is resolved. (optional)

Return map keys:

KeyDescription
:resultRun result.
:exception-detailsException details. (optional)
Runs script with given id in a given context.

Parameters map keys:


  Key                       | Description 
  --------------------------|------------ 
  :script-id                | Id of the script to run.
  :execution-context-id     | Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. (optional)
  :object-group             | Symbolic group name that can be used to release multiple objects. (optional)
  :silent                   | In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state. (optional)
  :include-command-line-api | Determines whether Command Line API should be available during the evaluation. (optional)
  :return-by-value          | Whether the result is expected to be a JSON object which should be sent by value. (optional)
  :generate-preview         | Whether preview should be generated for the result. (optional)
  :await-promise            | Whether execution should `await` for resulting value and return once awaited promise is resolved. (optional)

Return map keys:


  Key                | Description 
  -------------------|------------ 
  :result            | Run result.
  :exception-details | Exception details. (optional)
sourceraw docstring

set-custom-object-formatter-enabledclj

(set-custom-object-formatter-enabled)
(set-custom-object-formatter-enabled {:as params :keys [enabled]})
(set-custom-object-formatter-enabled connection {:as params :keys [enabled]})

Parameters map keys:

KeyDescription
:enablednull

Parameters map keys:


  Key      | Description 
  ---------|------------ 
  :enabled | null
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close