0

I have

$(window).on('online', function() { console.log('online'); });

And I'm trying to fire it on page load with

$(window).trigger('online');

Is there any way to do this without jquery? For example:

window.addEventListener('online', function() { console.log('online'); });
window.createEvent...?
Matthew James Davis
  • 11,984
  • 6
  • 58
  • 88

0 Answers0