MCPcopy Index your code
hub / github.com/microsoft/playwright-python / expose_function

Method expose_function

playwright/_impl/_page.py:512–513  ·  view source on GitHub ↗
(self, name: str, callback: Callable)

Source from the content-addressed store, hash-verified

510 return await self._main_frame.add_style_tag(**locals_to_params(locals()))
511
512 async def expose_function(self, name: str, callback: Callable) -> Disposable:
513 return await self.expose_binding(name, lambda source, *args: callback(*args))
514
515 async def expose_binding(self, name: str, callback: Callable) -> Disposable:
516 if name in self._bindings:

Calls 1

expose_bindingMethod · 0.95