Why isn't window.addeventListener working in plugin file?
I have this file sw-register.js being loaded as a plugin and I see the "inside if" console log, but not the "inside addevent listener". I have confirmed that window exists, but it does not appear to have the addEventListener function listed in the console. Any ideas?
1 Reply
hmm yes I was just arriving at a tentative conclusion that page has already loaded so thats not firing
in that case i could remove the eventlistener and go ahead and load register the sw file
issues a little further down the line, but that appears to have worked. thanks!