The best way would be to let them share a context entity used by both widgets. It does need proper timing though and good analysis of the use case as it can become tricky with refreshes outside of the widget etc. Another option would be, if there are very clear points of interaction, to let one widget expose an event via JavaScript and let that other widget listen to that event. You would then probably still need a context entity for that event, but this should work as well.