Since you already have access to the widget here, why not:
Assuming you’re using a button or some other control, this way you’d need no script in the widget, and no casting.