update( includeAll = false ) {

		let config = this.Reveal.getConfig();
		let currentSlide = this.Reveal.getCurrentSlide();
		let indices = this.Reveal.getIndices();

		let currentBackground = null;

		// Reverse past/future classes when in RTL mode
		let horizontalPast = config.rtl ? 'future' : 'past',
			horizontalFuture = config.rtl ? 'past' : 'future';

		// Update the classes of all backgrounds to match the
		// states of their slides (past/present/future)
		Array.from( this.element.childNodes ).forEach( ( backgroundh, h ) => {

			backgroundh.classList.remove( 'past', 'present', 'future' );

			if( h < indices.h ) {
				backgroundh.classList.add( horizontalPast );
			}
			else if ( h > indices.h ) {
				backgroundh.classList.add( horizontalFuture );
			}
			else {
				backgroundh.classList.add( 'present' );

				// Store a reference to the current background element
				currentBackground = backgroundh;
			}

			if( includeAll || h === indices.h ) {
				queryAll( backgroundh, '.slide-background' ).forEach( ( backgroundv, v ) => {

					backgroundv.classList.remove( 'past', 'present', 'future' );

					const indexv = typeof indices.v === 'number' ? indices.v : 0;

					if( v < indexv ) {
						backgroundv.classList.add( 'past' );
					}
					else if ( v > indexv ) {
						backgroundv.classList.add( 'future' );
					}
					else {
						backgroundv.classList.add( 'present' );

						// Only if this is the present horizontal and vertical slide
						if( h === indices.h ) currentBackground = backgroundv;
					}

				} );
			}

		} );

		// The previous background may refer to a DOM element that has
		// been removed after a presentation is synced & bgs are recreated
		if( this.previousBackground && !this.previousBackground.closest( 'body' ) ) {
			this.previousBackground = null;
		}

		if( currentBackground && this.previousBackground ) {

			// Don't transition between identical backgrounds. This
			// prevents unwanted flicker.
			let previousBackgroundHash = this.previousBackground.getAttribute( 'data-background-hash' );
			let currentBackgroundHash = currentBackground.getAttribute( 'data-background-hash' );

			if( currentBackgroundHash && currentBackgroundHash === previousBackgroundHash && currentBackground !== this.previousBackground ) {
				this.element.classList.add( 'no-transition' );

				// If multiple slides have the same background video, carry
				// the <video> element forward so that it plays continuously
				// across multiple slides
				const currentVideo = currentBackground.querySelector( 'video' );
				const previousVideo = this.previousBackground.querySelector( 'video' );

				if( currentVideo && previousVideo ) {

					const currentVideoParent = currentVideo.parentNode;
					const previousVideoParent = previousVideo.parentNode;

					// Swap the two videos
					previousVideoParent.appendChild( currentVideo );
					currentVideoParent.appendChild( previousVideo );

				}
			}

		}

		const backgroundChanged = currentBackground !== this.previousBackground;

		// Stop content inside of previous backgrounds
		if( backgroundChanged && this.previousBackground ) {

			this.Reveal.slideContent.stopEmbeddedContent( this.previousBackground, { unloadIframes: !this.Reveal.slideContent.shouldPreload( this.previousBackground ) } );

		}

		// Start content in the current background
		if( backgroundChanged && currentBackground ) {

			this.Reveal.slideContent.startEmbeddedContent( currentBackground );

			let currentBackgroundContent = currentBackground.querySelector( '.slide-background-content' );
			if( currentBackgroundContent ) {

				let backgroundImageURL = currentBackgroundContent.style.backgroundImage || '';

				// Restart GIFs (doesn't work in Firefox)
				if( /\.gif/i.test( backgroundImageURL ) ) {
					currentBackgroundContent.style.backgroundImage = '';
					window.getComputedStyle( currentBackgroundContent ).opacity;
					currentBackgroundContent.style.backgroundImage = backgroundImageURL;
				}

			}

			this.previousBackground = currentBackground;

		}

		// If there's a background brightness flag for this slide,
		// bubble it to the .reveal container
		if( currentSlide ) {
			this.bubbleSlideContrastClassToElement( currentSlide, this.Reveal.getRevealElement() );
		}

		// Allow the first background to apply without transition
		setTimeout( () => {
			this.element.classList.remove( 'no-transition' );
		}, 10 );

	}
Updates the background elements to reflect the current
slide.

@param {boolean} includeAll If true, the backgrounds of
all vertical slides (not just the present) will be updated.