Evaluate JS in Webview
webview_evaluateExecutes JavaScript in a mobile WebView and returns the JSON result, including resolved promises. Supports older Chrome versions by avoiding modern syntax.
Instructions
在 webview 页面执行 JS 并返回 JSON 结果(Runtime.evaluate,returnByValue+awaitPromise)。⚠ chrome68 老机型禁用 ?./??,用 a&&a.b。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | 目标设备 serial(同 mobile_list_available_devices 的 id) | |
| expression | Yes | JS 表达式,如 location.hash 或 (function(){...})() |