comparison libervia/pages/_browser/bridge.py @ 1509:106bae41f5c8

massive refactoring from camelCase -> snake_case. See backend commit log for more details
author Goffi <goffi@goffi.org>
date Sat, 08 Apr 2023 13:44:11 +0200
parents ce879da7fcf7
children 5ea06e8b06ed
comparison
equal deleted inserted replaced
1508:ec3ad9abf9f9 1509:106bae41f5c8
241 "id": tab_id, 241 "id": tab_id,
242 "connecting_tab": self.connecting_tab 242 "connecting_tab": self.connecting_tab
243 }) 243 })
244 244
245 245
246 class Bridge: 246 class bridge:
247 bc: BroadcastChannel | None = None 247 bc: BroadcastChannel | None = None
248 248
249 def __init__(self) -> None: 249 def __init__(self) -> None:
250 if Bridge.bc is None: 250 if bridge.bc is None:
251 Bridge.bc = BroadcastChannel() 251 bridge.bc = BroadcastChannel()
252 252
253 def __getattr__(self, attr): 253 def __getattr__(self, attr):
254 return lambda *args, **kwargs: self.call(attr, *args, **kwargs) 254 return lambda *args, **kwargs: self.call(attr, *args, **kwargs)
255 255
256 def on_load(self, xhr, ev, callback, errback): 256 def on_load(self, xhr, ev, callback, errback):