first commit
This commit is contained in:
4
src/browser/__init__.py
Normal file
4
src/browser/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from browser.internal import Document, Window # type: ignore
|
||||
|
||||
document = Document()
|
||||
window = Window()
|
||||
15
src/browser/internal.py
Normal file
15
src/browser/internal.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# type: ignore
|
||||
|
||||
|
||||
class Document:
|
||||
def __getattr__(self, attr):
|
||||
return lambda x: document[attr](x)
|
||||
|
||||
|
||||
class Window:
|
||||
def __getattr__(self, attr):
|
||||
return lambda x: window[attr](x)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user