* Starts up reveal.js by binding input events and navigating * to the current URL deeplink if there is one.
()
| 192 | * to the current URL deeplink if there is one. |
| 193 | */ |
| 194 | function start() { |
| 195 | |
| 196 | // Don't proceed if this instance has been destroyed |
| 197 | if( initialized === false ) return; |
| 198 | |
| 199 | ready = true; |
| 200 | |
| 201 | // Remove slides hidden with data-visibility |
| 202 | removeHiddenSlides(); |
| 203 | |
| 204 | // Make sure we've got all the DOM elements we need |
| 205 | setupDOM(); |
| 206 | |
| 207 | // Listen to messages posted to this window |
| 208 | setupPostMessage(); |
| 209 | |
| 210 | // Prevent the slides from being scrolled out of view |
| 211 | setupScrollPrevention(); |
| 212 | |
| 213 | // Adds bindings for fullscreen mode |
| 214 | setupFullscreen(); |
| 215 | |
| 216 | // Resets all vertical slides so that only the first is visible |
| 217 | resetVerticalSlides(); |
| 218 | |
| 219 | // Updates the presentation to match the current configuration values |
| 220 | configure(); |
| 221 | |
| 222 | // Create slide backgrounds |
| 223 | backgrounds.update( true ); |
| 224 | |
| 225 | // Activate the print/scroll view if configured |
| 226 | activateInitialView(); |
| 227 | |
| 228 | // Read the initial hash |
| 229 | location.readURL(); |
| 230 | |
| 231 | // Notify listeners that the presentation is ready but use a 1ms |
| 232 | // timeout to ensure it's not fired synchronously after #initialize() |
| 233 | setTimeout( () => { |
| 234 | // Enable transitions now that we're loaded |
| 235 | dom.slides.classList.remove( 'no-transition' ); |
| 236 | |
| 237 | dom.wrapper.classList.add( 'ready' ); |
| 238 | |
| 239 | dispatchEvent({ |
| 240 | type: 'ready', |
| 241 | data: { |
| 242 | indexh, |
| 243 | indexv, |
| 244 | currentSlide |
| 245 | } |
| 246 | }); |
| 247 | }, 1 ); |
| 248 | |
| 249 | } |
| 250 | |
| 251 | /** |
nothing calls this directly
no test coverage detected
searching dependent graphs…