How to trigger a mouseClicked function for a window visonOpened?

Hi all,

I have a mouseclicked function in a component

and i would like to trigger this function from the visionopened event. i tried doing the following but it doesnt work. any advice?

You cannot (well, not easily).

Move the code to a project script. Call that project script from both events.