donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
24 lines • 908 B
TypeScript
import type { BrowserContext, Frame, Page } from 'playwright';
/**
* Extends the Playwright BindingCall functionality to include a name property.
* This enables a well-defined mapping between the name and associated callback
* when using BrowserContext.exposeBinding().
*
* @see https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding
*/
export interface NamedBindingCallback {
/**
* The name of the method as it should be called in Javascript
* (i.e., as it should be passed to the `name` parameter of BrowserContext.exposeBinding)
*/
name(): string;
/**
* The callback function that will be invoked when the binding is called from the page
*/
call(source: {
context: BrowserContext;
page: Page;
frame: Frame;
}, ...args: unknown[]): Promise<unknown>;
}
//# sourceMappingURL=NamedBindingCallback.d.ts.map