Highlights
✨ Browser-like object output in the js-shell
Evaluating an object in webinspector js-shell now lists all of its top-level properties, one shortened line each, instead of WebKit's capped preview. Listings are fetched via Runtime.getDisplayableProperties — the same RPC Safari's Web Inspector uses — so DOM elements show their real attributes (inherited native accessors included), and values are read from descriptors without ever invoking getters:
pymobiledevice3 webinspector js-shell
> window
Window {
window: Window
document: Document
location: Location
...
}✨ Smarter js-shell completions
Completions are now sorted alphabetically, functions are marked with ƒ in the completion menu, and $ identifiers ($x.<TAB>) complete. The completion list is built getter-safely and always fetched fresh, so it can never go stale.
🐛 console.log printed only the first argument
WebKit delivers all console arguments as RemoteObjects in parameters, with only the first in text; the console handler printed just text. console.log(4, 4) now prints 4 4, with objects rendered by class name.
✨ Replayed console history is now distinguishable
On attach, WebKit replays the page's buffered console history. Those messages now log under webinspector.console.replay instead of masquerading as live output — and js-shell --no-replayed-log silences them entirely:
pymobiledevice3 webinspector js-shell --no-replayed-log✨ Interactive prompts migrated to questionary
Device/page selection prompts moved from inquirer3 to questionary (built on prompt_toolkit, which was already a dependency — three transitive dependencies dropped, better Windows console handling). Prompts reached from async commands no longer crash with asyncio.run() cannot be called from a running event loop, and every selection prompt now fails fast without a TTY, printing the candidates on stderr with a --udid / PYMOBILEDEVICE3_UDID hint — no more escape sequences leaking into pipes and CI logs.
🐛 Spurious CRITICAL log in every js-shell session
Runtime.executionContextCreated — a normal event WebKit pushes after Runtime.enable — was logged as CRITICAL unhandled message on every session. It is now handled (debug-logged), while truly unknown events still get flagged.
🐛 Outbound HTTP requests could hang forever
HTTP requests (activation, file downloads) now carry a timeout. Thanks @bunlongheng!
What's Changed
- e475d7c webinspector: Use Runtime.getDisplayableProperties for object listings (#1845) (@doronz88)
- 5544836 webinspector: Improve js-shell completions - sorting, kind markers, $ identifiers (#1845) (@doronz88)
- 4142764 webinspector: List all top-level properties for object results in js-shell (#1845) (@doronz88)
- 414d021 webinspector: Expose raw Runtime.getProperties descriptors (#1845) (@doronz88)
- 866a30b notification_proxy: Demote 'Observing ' logs to debug (#1844) (@doronz88)
- bab6302 webinspector: Add --no-replayed-log to js-shell (#1844) (@doronz88)
- 5c286e9 webinspector: Route replayed console history to webinspector.console.replay (#1844) (@doronz88)
- eb67b63 webinspector: Print all console arguments, not only the first (#1844) (@doronz88)
- cb212b7 webinspector: Handle Runtime.executionContextCreated in inspector sessions (#1844) (@doronz88)
- 8b0dc9b cli: Fail fast when a selection prompt has no TTY (#1843) (@doronz88)
- b4adff3 cli: Migrate interactive prompts from inquirer3 to questionary (#1843) (@doronz88)
- f137850 requests: Add timeout to outbound HTTP requests to prevent hang (#1842) (@bunlongheng)
New Contributors
- @bunlongheng made their first contribution in #1842
Full Changelog: v10.5.0...v10.6.0