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

Method unroute

playwright/_impl/_browser_context.py:449–459  ·  view source on GitHub ↗
(
        self, url: URLMatch, handler: Optional[RouteHandlerCallback] = None
    )

Source from the content-addressed store, hash-verified

447 return DisposableStub(lambda: self.unroute(url, handler), self)
448
449 async def unroute(
450 self, url: URLMatch, handler: Optional[RouteHandlerCallback] = None
451 ) -> None:
452 removed = []
453 remaining = []
454 for route in self._routes:
455 if route.url != url or (handler and route.handler != handler):
456 remaining.append(route)
457 else:
458 removed.append(route)
459 await self._unroute_internal(removed, remaining, "default")
460
461 async def _unroute_internal(
462 self,

Callers 1

routeMethod · 0.95

Calls 2

_unroute_internalMethod · 0.95
appendMethod · 0.80

Tested by

no test coverage detected