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
  • 12,134
  • 7
  • 61
  • 90

0 Answers0