ReactiveHTML: data provided to server side event handlers by DOM events

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?

1 Like

Hi @keul

Is this still an open question after your contributions on github? If it is, could you provide a minimum, reproducible example to help guide me and the community understand your needs?


My specific question has been answered (for posterity: see the issue).

But, generally speaking, I’m wondering how a canonical Panel application query the server, if there are other ways of making backend and front-end to communicate.