lexonomy_custom_editor/src/browser/internal.py

20 lines
335 B
Python

# type: ignore
class Proxy:
def __init__(self, proxied):
self.proxied = proxied
def __getattr__(self, attr):
if callable(self.proxied[attr]):
return lambda *x: self.proxied[attr](*x)
else:
return self.proxied[attr]
_document = Proxy(document)
_window = Proxy(window)