Is there an afterAppear event for widgets?
Summary:
On load triggers on widget initialization. Before appear triggers before the widget template is inserted into the dom.
The causes issues when we need to initialize stuff on the dom of the widget. It works fine on full page loads but once I navigate away and back, beforeAppear triggers before the widget template exists in the dom and so something like document.querySelector(".products") finds nothing.
How can we fix this?
Version (include the version you are using, if applicable):
Storefront Classic v25
Code Snippet (add any code snippets that support your topic, if applicable):