Heartbeat API in Vanilla JS (addEventListener)
-
Hi guys!
Why following code written in jquery works great
<script> jQuery(document).ready( function($) { $(document).on('heartbeat-tick', function() { console.log('OK'); }); }); </script>
… but when I try to use it with vanilla js then it’s not working:
<script> jQuery(document).ready( function($) { document.addEventListener('heartbeat-tick', function() { console.log('OK'); }); }); </script>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Heartbeat API in Vanilla JS (addEventListener)’ is closed to new replies.