File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -298,15 +298,16 @@ so returned values have to JSON-serializable.
298298
299299- ** args** (array) _ (optional)_ : An optional list of arguments to pass to the function.
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
310+
310311---
311312
312313### ` get_console_message `
Original file line number Diff line number Diff line change 66
77import type { McpContext , TextSnapshotNode } from '../McpContext.js' ;
88import { zod } from '../third_party/index.js' ;
9- import type { ElementHandle , KeyInput } from '../third_party/index.js' ;
9+ import type { ElementHandle } from '../third_party/index.js' ;
1010import { parseKey } from '../utils/keyboard.js' ;
1111
1212import { ToolCategory } from './categories.js' ;
@@ -288,7 +288,7 @@ export const pressKey = defineTool({
288288 } ,
289289 handler : async ( request , response , context ) => {
290290 const page = context . getSelectedPage ( ) ;
291- const tokens = parseKey ( request . params . key ) as KeyInput [ ] ;
291+ const tokens = parseKey ( request . params . key ) ;
292292 const [ key , ...modifiers ] = tokens ;
293293
294294 await context . waitForEventsAfterAction ( async ( ) => {
You can’t perform that action at this time.
0 commit comments