Skip to content

Show is stateless now

Pre-release
Pre-release
Compare
Choose a tag to compare
@apiad apiad released this 15 Dec 17:36
07d6d64

With this update, we add a parameter to all slide functions named ctx, of type Context. This object now contains all the layout logic of the slideshow, so instead of calling show.markdown you will now call ctx.markdown. This allows us to completely detach the show object from the state of each slide. So now every slide is stateless, animation status and text input state is maintained in JavaScript, and it becomes safe to run a slideshow on different browsers.