I’m diving into documentation at Custom Components — Panel v0.13.1 using a ReactiveHTML subclass.
Inside my _scripts
I’ve a JavaScript source like the following:
node.dispatchEvent(new CustomEvent('customevent', { detail: { foo: 'bar' } }))
As documented, I’m able to intercept the client event in a method named _node_id_customevent
.
The only issue I see with this approach is the very limited set of information I receive in the Python method.
The event object just provides minimal data like the DOM node id and the name of the event, while no additional data from the event seems to be serialized.
It this OK? There’s a preferred way to pass back information from user interaction back to the server?