passing attributes to events #633
Answered
by
rmorshea
acivitillo
asked this question in
Question
-
Is it possible to pass on additional attributes to events? def handle_click(event):
print(event["target"]["value"]) #<- returns KeyValue Error
html.a({"onClick":handle_click", "value":"somevalue"}) The |
Beta Was this translation helpful? Give feedback.
Answered by
rmorshea
Jan 30, 2022
Replies: 1 comment 6 replies
-
IDOM serializes event information here. Then, for attributes of an event target that get serialized, those are handled here. In the case of the
If there's any missing event or event target information that should be included I'd be happy to take a contribution to fix that. |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
rmorshea
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IDOM serializes event information here. Then, for attributes of an event target that get serialized, those are handled here. In the case of the
value
attribute, it's only present for the following element types:If there's any missing event or event target information that should be included I'd be happy to take a contribution to fix that.