9

I'm looking for an e-reader that can embed Javascript in an e-book. I need to display a popup in the e-book but using a e-reader.

Apparently, it is not possible for the Kindle Reader but I'm wondering if it is possible with another device?

5
  • I need to load some information as a popup with some part of the text. The better solution will be Javascript but for now I've didn't find any device that embed JS. Commented May 26, 2015 at 13:14
  • I need to have javascript embedded in the ebook naturally and these javascript should be used in the e-reader device. My problem is to find a e-reader device that allow the use of Javascript. Commented May 26, 2015 at 14:01
  • I've updated the answer. I know that ePub3 allows JS development but for me I want to use these possibilities in an e-book loaded in an e-reader. Commented May 26, 2015 at 14:19
  • Welcome to Ebooks.SE by the way.
    – Anthon
    Commented May 26, 2015 at 15:03
  • @Anthon thanks, my answer was unclear because for me it was clear that I need to use JS in ebook in the e-reader and not in any other app. Now it's clear ;-) Commented May 26, 2015 at 15:06

3 Answers 3

2

JavaScript is an optional part of the epub 3.0 specification:

EPUB Content Documents may contain scripting using the facilities defined for this in the respective underlying specifications ([HTML5] and [SVG]).

What this means is that even a fully-compliant epub 3.0 device doesn't need to implement JavaScript support. The ones that do will generally be the "more bells and whistles" devices; the iPad, for example, supports JavaScript. The IDPF's epub Chrome extension Readium does as well.

Note that according to the epub 3.0 specification, the following criteria for reading systems that support JavaScript must be met:

› It must support container-constrained scripting and may support spine-level scripting.

› It may render Scripted Content Documents as an interactive, scripted User Agent according to [HTML5].

› It must not allow a container-constrained script to modify the DOM of the parent Content Document or other contents in the EPUB Publication, and must not allow it to manipulate the size of its containing rectangle. (Note: Even if a script is not container-constrained, the Reading System may impose restrictions on modifications (see also the dom-manipulation feature).)

› It may place additional limitations on the capabilities provided to scripts during execution (e.g., limiting networking).

› It must implement the JavaScript navigator extension object epubReadingSystem defined in Appendix A, JavaScript epubReadingSystem Object . It also must support the dom-manipulation and layout-change features defined in Features in container-constrained scripting contexts.

› It must regard the scripted [Publications301] property of the Package Document manifest item element as the authoritative definition of whether an EPUB Content Document includes scripting.

EDIT: Popup text and images are definitely possible using JavaScript in iBooks. For an example, check out Beneath The Ink.

0

Also Adobe Digital Editions 4.0 seems to reading JavaScript. It is rather important, because ADE is rendering engine for most e-readers for the market. Unfortunately not all (if any at all) manufacturers use new engine at this time. ADE 4.0 is available on Adobe sites

3
  • Which devices use ADE? Sony Reader use it or no? Commented May 25, 2015 at 12:46
  • I wasn't able to find any confirmation but you can safely assume that Sony use Adobe RMSDK. But Sony have abandon developing of any e-reading systems back in 2014 so you can't count Sony devices will be able to run any of JavaScript.
    – Glorifind
    Commented May 25, 2015 at 14:01
  • 1
    I'd not expect Sony devices to ever do JavaScript
    – Auspex
    Commented Jun 16, 2015 at 3:14
0

I'm looking for an e-reader that can embed Javascript.

AFAIK, only tablets with epub3 apps support Javascript.

For example, iPads/iPhones with iBooks and Android tablets with Gitden Reader (which is also available for iOS.)

2
  • I think pocketbook have some e-readers with RMSDK v.10 which could be able to run some JS but heavy testing is needed
    – Glorifind
    Commented May 26, 2015 at 8:49
  • AFAIK, scripting was introduced in RMSDK v.11 and none of the PocketBook models supports it.
    – user4665
    Commented May 26, 2015 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.