File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 292292
293293### ` evaluate_script `
294294
295- ** Description:** Evaluate a JavaScript function inside the currently selected page. Returns the response as JSON
296- so returned values have to JSON-serializable.
295+ ** Description:** Evaluate a JavaScript function inside the currently selected page. Returns the response as JSON,
296+ so returned values have to be JSON-serializable.
297297
298298** Parameters:**
299299
300300- ** function** (string) ** (required)** : A JavaScript function declaration to be executed by the tool in the currently selected page.
301- Example without arguments: `() => {
301+ Example without arguments: `() => {
302302 return document.title
303303}` or ` async () => {
304304 return await fetch("example.com")
305305}`.
306- Example with arguments: `(el) => {
306+ Example with arguments: `(el) => {
307307 return el.innerText;
308308}`
309309
You can’t perform that action at this time.
0 commit comments