Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What HTML5 features are available for Dashcode widgets in iBooks?

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?

like image 847
Thilo Avatar asked Jan 20 '12 06:01

Thilo


2 Answers

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

like image 162
widged Avatar answered Oct 15 '22 18:10

widged


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.

like image 43
Alex Basson Avatar answered Oct 15 '22 17:10

Alex Basson