Skip to content

Commit ad976cc

Browse files
committed
docs(browser): clarify DOM global scope
1 parent 1ff4926 commit ad976cc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • packages/bcode-browser/skills/browser-execute

packages/bcode-browser/skills/browser-execute/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Every explicit reconnect or browser switch retires the previous socket and clear
112112
113113
## Driving a page
114114
Domain methods follow `session.<Domain>.<method>(params)` and return Promises.
115+
Page globals such as `document`, `window`, and `location` are available inside `session.Runtime.evaluate(...)`, not in the surrounding `browser_execute` snippet.
115116
The full surface (652 commands) is the Chrome DevTools Protocol.
116117
`Object.keys(session.domains).sort()` lists every CDP domain bound on the session; `Object.keys(session.Page).sort()` lists the methods for `Page`.
117118
For unknown param shapes, call with `{}` and inspect the thrown `CdpError``.data` carries the missing-field detail.

0 commit comments

Comments
 (0)