MCPcopy Create free account
hub / github.com/Vinyzu/Botright / callback_proxy

Method callback_proxy

botright/playwright_mock/browser.py:321–341  ·  view source on GitHub ↗
(source: SourceDict, *args, **kwargs)

Source from the content-addressed store, hash-verified

319 else:
320
321 def callback_proxy(source: SourceDict, *args, **kwargs):
322 _context: PlaywrightBrowserContext = source["context"]
323 _page: PlaywrightPage = source["page"]
324 _frame: PlaywrightFrame = source["frame"]
325
326 context = BrowserContext(
327 _context,
328 self.proxy,
329 self.faker,
330 use_undetected_playwright=self.use_undetected_playwright,
331 cache=self.cache,
332 user_action_layer=self.user_action_layer,
333 scroll_into_view=self.scroll_into_view,
334 mask_fingerprint=self.mask_fingerprint,
335 )
336 page = Page(_page, self, self.faker)
337 frame = Frame(_frame, page)
338
339 source["context"], source["page"], source["frame"] = context, page, frame
340
341 return callback(source, *args, **kwargs)
342
343 await self._origin_expose_binding(name=name, callback=callback_proxy, handle=handle)

Callers

nothing calls this directly

Calls 3

BrowserContextClass · 0.85
PageClass · 0.85
FrameClass · 0.85

Tested by

no test coverage detected