Reveal.add/remveEventListener -> Reveal.on/off

This commit is contained in:
Hakim El Hattab
2020-04-07 09:05:56 +02:00
parent f24620018f
commit 855cc82d76
17 changed files with 113 additions and 91 deletions

View File

@ -105,7 +105,7 @@
// If we're printing to PDF, scroll the code highlights of
// all blocks in the deck into view at once
Reveal.addEventListener( 'pdf-ready', function() {
Reveal.on( 'pdf-ready', function() {
[].slice.call( document.querySelectorAll( '.reveal pre code[data-line-numbers].current-fragment' ) ).forEach( function( block ) {
RevealHighlight.scrollHighlightedLineIntoView( block, {}, true );
} );