INNER CODE UNIT · Python
__init__
feder-cr/invisible_playwright · src/invisible_playwright/_juggler/server.py:87
def __init__(self, server, parent, undo) -> None:
self._undo = undo
super().__init__(server, parent, {})
def op_dispose(self, params: Dict) -> Any:
try:
self._undo()
except Exception:
# ⛔ A caller tidying up must not be handed an error because the
# page it belonged to is already gone.
pass
self.dispose()
return None
class RefusingDispatcher(Dispatcher):
"""An object that exists so the tree is well formed, and refuses the rest.