iBooks 中的 Dashcode 小部件有哪些 HTML5 功能可用?
使用新的 iBooks Author 工具,您可以为 iPad 创建电子书。该格式允许您嵌入使用 Dashcode 创建的 HTML 小部件。生成的文件可以在应用程序商店之外分发,与离线 HTML5 Web 应用程序(必须通过 Safari 安装)相比,类似,但可能更容易(因为它只是 Apple 完全支持的格式的一个文件)。
HTML5 的哪些功能可以在这些 Dashcode 小部件中使用?例如有 DOM 存储吗?帆布?地点?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
关于存储,在 iPad 上的预览模式下进行的测试表明 localStorage 可以正常工作。这是每本书。您可以将数据保存在一个 HTML 小部件中,并在另一个 HTML 小部件中读取它们。
关于位置,这篇关于“iBooks Author 的位置”的博文建议它具有功能性
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
我刚刚构建了一个测试小部件,它使用 flot 将图形绘制到画布元素中,然后我将小部件插入 iBook 中。在 iPad 1 上预览 iBook 时,图表不会出现在布局缩略图中,但当展开到全屏时,图表会显示得很漂亮。
就画布而言:它似乎可用,但显然仅在全屏交互模式下可用。
更新:显然,布局内缩略图只是小部件的图像,而不是小部件本身,这就是图表(需要执行代码)不显示的原因。
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.
CSS 动画可以通过 iBooks 作者小部件支持插入到 iBooks 中。这是我们使用 Sencha Animator 向 iBooks Author 添加动画。
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.
我没有在 iPad 1 上执行 Canvas 代码。
更新:在 iPad 2 上也没有成功。
(编辑:我正在使用 Processing.js 库)
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)
有一个带有一些演示 HTML 小部件的 github 存储库,展示了如何使用交互功能。
There is a github repo with a few demonstration HTML widgets that show how to use the interactive features.