fragments are now included in URL by default, even on named slides

This commit is contained in:
Hakim El Hattab
2020-04-22 11:11:14 +02:00
parent d727509dbc
commit 9823be99f4
9 changed files with 123 additions and 30 deletions

View File

@@ -490,13 +490,13 @@ export default function( revealElement, options ) {
eventsAreBound = true;
window.addEventListener( 'hashchange', onWindowHashChange, false );
window.addEventListener( 'resize', onWindowResize, false );
if( config.touch ) touch.bind();
if( config.keyboard ) keyboard.bind();
if( config.progress ) progress.bind();
controls.bind();
location.bind();
dom.slides.addEventListener( 'transitionend', onTransitionEnd, false );
dom.pauseOverlay.addEventListener( 'click', resume, false );
@@ -518,8 +518,8 @@ export default function( revealElement, options ) {
keyboard.unbind();
controls.unbind();
progress.unbind();
location.unbind();
window.removeEventListener( 'hashchange', onWindowHashChange, false );
window.removeEventListener( 'resize', onWindowResize, false );
dom.slides.removeEventListener( 'transitionend', onTransitionEnd, false );
@@ -2288,17 +2288,6 @@ export default function( revealElement, options ) {
}
/**
* Handler for the window level 'hashchange' event.
*
* @param {object} [event]
*/
function onWindowHashChange( event ) {
location.readURL();
}
/**
* Handler for the window level 'resize' event.
*