Skip to content

Commit 081150b

Browse files
committed
Fix dom
1 parent 70d7ba8 commit 081150b

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

violetear/dom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from js import document, console
99
from pyodide.ffi import create_proxy
1010
else:
11-
raise RuntimeError(
11+
raise ImportError(
1212
"Module violetear.dom is only supposed to be used in the browser."
1313
)
1414

violetear/markup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import textwrap
2121
from typing import Self
22-
from violetear.dom import Event
2322
from violetear.helpers import flatten
2423
from violetear.style import Style
2524
from violetear.stylesheet import StyleSheet
@@ -126,7 +125,7 @@ def attrs(self, **attrs) -> Element:
126125
self._attrs.update(attrs)
127126
return self
128127

129-
def on(self, event: str, handler: Callable[[Event]]) -> Self:
128+
def on(self, event: str, handler: Callable) -> Self:
130129
"""
131130
Binds a python function to a DOM event.
132131
Serializes the function name to a data attribute.

0 commit comments

Comments
 (0)