JavaScript

if (feature) { /* do something */ }

(It’s like @supports but for JS)

Taking static resources and turning them into dynamic interactions.

Oops, it looks like you can’t see this video. So, to sum up, there’s a button at the beginning of the new chapter and, by clicking it, you enable or disable a focus mode in which important passages of the chapter are emphasized.

Building optional features which can improve the reading experience.

Oops, it looks like you can’t see this video. So, to sum up, there are audio controls on top of a Moby Dick poem. Except there is no audio file on the page, audio controls are a super simple bridge to speech synthesis (aka Text-to-speech). Should the browser not support this, audio controls will not appear.

JavaScript can deal with the painful stuff…like tables.

Oops, it looks like you can’t see this video. To sum up, the web found solutions to make tables responsive a long time ago. JavaScript can deal with overflow, by enabling pagination, and provide controls to toggle columns, sort data, switch presentation modes, etc. You could even display an interactive chart in place of a huge table based on the available width. This is way better than the current solutions iBooks or Kindle provide in terms of user experience.

Lots of people think JavaScript is evil when it comes to a11y.

The truth is, JavaScript can improve a11y dramatically.

Oops, it looks like you can’t see this video. To sum up, check next slide for a description.

What’s happening here?

A specific stylesheet for dyslexia is loaded

Buttons + inputs are created and provide extras

If speech synthesis is supported, it can be enabled/disabled via a checkbox

Oops, it looks like you can’t see this video. So, to sum up, this video shows that you can do much more than JavaScript functions. Typing functions over and over again is boring so in this example an EPUB file is displayed and by clicking/tapping an element, a custom list of styles is retrieved and displayed in an inline console. Think of it as a debug mode embedded in the EPUB file itself. And just imagine dat person forgetting to get rid of the script before distributing the EPUB file. That would be super funny, wouldn’t it? But you learn from the shit you made happen, eh.

It’s simplistic, it’s not elegant, you could so much more, much more efficiently… It’s pure crap! Real Web Developer

Shit you buildwill be a lot more useful thanelegant tools you don’t use.

You’ll acquire the necessary knowledge to understand the over-engineered tools you didn’t use.