Hey guys!
Anyone else have issues with doing a simple:
document.addEventListener("DOMContentLoaded", function() {
alert('hi');
});
Nothing happens… very strange I just have it in my custom route:
/* eslint-disable */
// import external dependencies
import 'StickyKit';
import 'Isotope';
import Barba from 'barba';
import TweenMax from 'TweenMax';
import TimelineMax from 'TimelineMax';
import ScrollMagic from 'ScrollMagic';
import 'animation.gsap';
//import 'debug.addIndicators';
export default {
init() {
document.addEventListener("DOMContentLoaded", function() {
alert('sdfsd');
});
},
finalize() {
// JavaScript to be fired on all pages, after page specific JS is fired
},
};
Am I missing some obvious thing about Sage?