Based on this question, I have created a custom anonymous event listener as follows:
function init() {
console.log("Initiating widgets");
}
window.addEventListener("widgetInit", init());
I can call it using $(window).trigger('widgetInit');
from code, however if I paste that into the console it simply returns the window object.
Is there a way to simulate the event via the console without modifying the code?