Simulate an event

Is there a way to simulate an event ?

For example if I had a Button() and Select() widgets:


button.callack = CustomJS(args=stuff,code=button_stuff)

def callback(attr,old,new):
# click the button

select.on_change(‘value’, callback)


what should I write in place of ‘# click the button’ ?

1 Like

Just wanted to add that I am really asking from the python callback side of things. I know I could do it with a js callback like that:

select.callback = CustomJS(code=“document.getElementsByTagName(‘button’)[0].click();”)