Skip to content

AppiumTransport.evaluate method

AppiumTransport › evaluate

Evaluates a JavaScript expression inside Obsidian Mobile's WebView.

Switches to the WEBVIEW_md.obsidian context, executes the expression, and returns the result string.

Signature:

evaluate(expression: string, _options: TransportEvalOptions): Promise<string>

Parameters:

ParameterTypeDescription
expressionstringThe JavaScript expression to evaluate.
_optionsTransportEvalOptionsEvaluation options (cwd is not used on mobile — vault targeting is via localStorage).

Returns: Promise<string>The normalized result string.