@strarsis with JQuery everything works flawlessly probably the ready()
function does something under the hood, but I was trying to get rid of jQuery.
I assume that browsersync for some reason doesn’t emit DOMDocumentLoaded
event, so I tried with the “update” method and it works:
if (document.readyState !== 'loading') {
routes.loadEvents();
}