Skip to content

Commit

Permalink
fix: Make the wavelite work for args, events and UI rendering. #1796
Browse files Browse the repository at this point in the history
  • Loading branch information
mturoci committed Jan 18, 2023
1 parent 4d970e7 commit 8c08821
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions py/h2o_wavelite/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ class PageBase:
url: The URL of the remote page.
"""

def __init__(self):
def __init__(self, url: str):
self.url = url
self._changes = []

def add(self, key: str, card: Any) -> Ref:
Expand Down Expand Up @@ -419,9 +420,9 @@ class AsyncPage(PageBase):
url: The URL of this page.
"""

def __init__(self, site: 'AsyncSite'):
def __init__(self, site: 'AsyncSite', url: str):
self.site = site
super().__init__()
super().__init__(url)

async def save(self):
"""
Expand All @@ -441,6 +442,9 @@ class AsyncSite:
def __init__(self, send: Optional[Callable] = None):
self.send = send

def __getitem__(self, url) -> AsyncPage:
return AsyncPage(self, url)

def __delitem__(self, key: str):
page = self[key]
page.drop()
Expand Down

0 comments on commit 8c08821

Please sign in to comment.