… web developer, writer, and consultant based in Hveragerði, Iceland.

I write about web dev, interactive media, digital publishing, and product development.

I’m available for consulting and hire.

Javascript in epub

After throwing together the Modernizr ePub experiment earlier today I decided throw together another one. The code isn't the prettiest I've written, the page itself is ugly as sin, and some of the transitions are a bit jumpy, but on the whole it works.

In web browsers, that is.

Two out of the three experiments work in iBooks, the third does not. It's a slideshow of three images. When you press 'next' in the third experiment, the first image fades out as it should, but the next image doesn't appear. However, if you double tap where the image should be, iBooks opens up the full-screen thing it does and displays the correct image, so it obviously knows what should be there, but isn't displaying it.

Now, in a web browser I'd be able to open up Firebug or a Web Inspector and figure out what it is that's causing this, whether it's a bug in the app, in my code or something else. In iBooks… well.

Other issues with these experiments is the rendering model necessitated by the lack of positioning in ePub which caused problems at every point and at every level and that is entirely due to the idiocy of those who hammered the standard together.

You can see the html page from the ePub here, or, if you wish, you can download the ePub file itself.


ETA (July 2012): Apple turned off access to many of these APIs a while back. The lesson is that iBooks isn't a stable development environment.

Join my Newsletter

Do you ever wonder why a newly released open source project matters? Why it doesn't? How new or old standards or specifications affect your work? Why the web, tech, and publishing are the way they are?

This is an unapologetically political newsletter about tech, the web, and publishing—with context.

Because, to decide whether to use a piece of software, web standard, or open source project, you need to know why it‘s interesting, not just that it‘s interesting.

I won't send you spam. Unsubscribe at any time.

Writing