I wanted to view custom events in the timeline of the web inspector of safari, or chrome's developer tools.
Has anyone had success creating events and having them displayed in the inspector? This would be extremely useful.
this doesn't show up in timeline:
var event = document.createEvent( 'CustomEvent' );
event.initCustomEvent('myEvent', true, false);
document.dispatchEvent( event );
this works, but it's a mouse event, which is not my intention:
var event = document.createEvent( 'MouseEvents' );
event.initEvent('click', true, false);
document.dispatchEvent( event );