What HTML5 features are available for Dashcode widgets in iBooks?

6.4k views Asked by At

With the new iBooks Author tool, you can create e-books for the iPad. The format allows you to embed HTML widgets created with Dashcode. The resulting files can be distributed outside of the app store, similar, but probably easier (because it is just one file in a format Apple fully supports), than offline HTML5 web apps (which you have to install via Safari).

What features of HTML5 can be used in those Dashcode widgets? Is there for example DOM storage? Canvas? Location?

5

There are 5 answers

0
rainerkohlberger On

I didn't get Canvas Code to execute on an iPad 1.

Update: no success on iPad 2 either.

(Edit: I was using the Processing.js library)

0
Alex Basson On

I just built a test widget that uses flot to draw graphs into a canvas element, and then I inserted the widget into an iBook. When previewing the iBook on my iPad 1, the graph doesn't appear in the in-layout thumbnail, but when expanded to full screen, the graph displays beautifully.

So as far as canvas is concerned: it appears to be available, but apparently only when in full-screen interactive mode.

Update: Apparently the in-layout thumbnail is just an image of the widget, not the widget itself, which is why the graph (which requires executing code) does not display.

0
Michael Mullany On

CSS Animations can be inserted into iBooks via the iBooks author widget support. Here is an example of us using Sencha Animator to add animations to iBooks Author.

0
Thilo On

There is a github repo with a few demonstration HTML widgets that show how to use the interactive features.

0
widged On

Regarding storage, tests made in preview mode on the iPad suggest that localStorage works. It is per book. You can save data in one HTML widget and read them in another HTML widget.

Regarding location, this blog post on "Location with iBooks Author" suggests that it is functional