4

I've been trying to find an eBook reader for Windows that fully supports EPUB3 (i.e. allows JavaScript) but I've had no such luck. So does anybody have at least one such application for each of:

  • Windows 10
  • Max OS X
  • Android
  • iOS

3 Answers 3

5

I don't believe any reader 'fully' supports EPUB3, in part because the EPUB3 and its satellite specs (e.g. annotation, distributable objects, widgets) are so broad that it's not viable for any one reader to implement it all.

On Windows, your best options may be Adobe Digital Editions and Calibre. More detail below.

The Readium project is an open attempt to provide a framework for reader developers with the widest possible support. The Readium Chrome app is a Readium EPUB3 reader, but now that Google has deprecated Chrome Apps it is no longer maintained.

There are readers that support a large proportion of Javascript, though not everything. And this support is poorly documented and hard to debug:

  • iBooks supports Javascript on "iBooks 1.5 or later and iOS 5.0 or later; macOS X Mavericks 10.9 or later". This internal Apple document has details on JS support. It's also possible to enable dev tools (aka Web Inspector) in iBooks.
  • The R2 Reader, which is essentially Readium, is available for iOS and Android. Readium uses the operating system's default browser engine, and as such supports a lot of Javascript.
  • Adobe Digital Editions uses a derivative of Readium SDK for its rendering engine. So it supports Javascript in a similar way. ADE is flawed in many ways (I find its CSS support very patchy).
  • Calibre is an open-source ereader and ebook-management app for Windows, Mac and Linux. It has a complex interface, because it can do so much, so it's not for everyone. It seems to support Javascript and CSS well.
  • The AZARDI reader from Infogrid Pacific supports Javascript. I find its UI confusing and its CSS support patchy, too.
  • Microsoft's Edge browser once opened epubs and, in theory, supported Javascript. However, Edge's EPUB reader's built-in Javascript heavily restructured the DOM of an epub document, which often breaks any Javascript in the epub itself. Microsoft removed epub support from Edge in October 2019. It's unlikely that epub support will return in future when Edge switches its rendering engine to Chromium.

At the moment, Google Play Books documentation says it does not support any Javascript:

Google Play Books doesn't support non-standard audio or video tags, or interactive functionality such as that enabled by JavaScript code.

FYI, this Ebooks question from a few years ago is similar.

UPDATE Jiminy Panoz maintains the excellent Blitz framework, and he says the following ereaders support Javascript. I've not tested these myself.

  • Kobo on iOS and Android
  • Readium-based apps in general e.g. CloudShelf Reader, Bookari, Helicon, Lis-a, LEA reader, Infinity Reader.
  • Lektz, Gitden on Android/iOS
  • Reasily on Android
  • Vitalsource Bookshelf on desktop
  • Bookworm on Linux

For more information on various aspects of reader support, see his support data here.

1
  • I already tried ADE, Readium, Edge and a few others - none of them would run an extremely simple script. One of them (ADE I believe) wouldn't even render a standard HTML button! I have decided to use epub.js for my purposes.
    – otah007
    Commented Aug 27, 2019 at 8:38
1

As far as I know, the major ebook reading systems don't support scripting even though it's in the epub3 (and 3.2) spec. You might want to check the reading systems which are targeting academic textbooks. I think that interactive quizzes will be the best use case for javascript in ebooks. Future versions of the spec will try to merge the browser experience with the book experience, so I think it's inevitable that it will happen, though you need to do fallbacks, etc.

The e-ink reading systems are pretty minimal, so it would be hard to upgrade them to support scripting. Also, educational publishers are more likely to build their own apps than to create content with scripting and beg the major reading systems to support that feature.

One thing I'd check is whether the content creation tools specific to a reading system have some built in scripts (like ibooks-author). Ibooks have certain interactive widgets which might accomplish what you want. Of course, that means you are designing for a single platform only.

1
  • It's a shame, I suppose I will have to develop my own application. I think for my purposes developing a plugin for Futurepress' epub.js and embedding the whole thing in Qt will be the best approach.
    – otah007
    Commented Aug 22, 2019 at 16:06
0

It's unlikley that companies who make an ereader app will support Javascript as it makes a potential security hole and the companies don't want the liability.

  1. Javascript might take more extra time to implement, especially with different or custom operating systems on hardware ereaders. The cost may not be worth the effort.
  2. Any new features could possibly introduce more liability than the company wants.
  3. The ereader company may not have the personnel with skills to implement JS on a hardware ereader.
  4. Many ereaders (hardware and software) use Adobe Digital Editions and ADE itself may not support JS at all. Paying a licensing fee for each unit that uses ADE may be simpler and cheaper than hiring a program who may or may not have the skills to get the job done.
  5. Perhaps the ereader CPU is not fast enough to support all JS functions so JS may slow down the functions on the page the user sees thus resulting in consumer complaints. Plus e-ink does not refresh very fast either.
4
  • Have you any evidence for that - it is quite possibly true but might be just as simple that they want static html so that battery is not iused on an open page.
    – mmmmmm
    Commented Sep 8, 2019 at 13:15
  • @mark I don't have a specific business case but part of business is determining risk vs reward for supporting certain features in an app. Part of business is also reducing liability. Did that answer your question to some degree?
    – Bulrush
    Commented Sep 9, 2019 at 10:37
  • No - as you are just guessing - it all seems possible but what evidence do you have that those were the reasons
    – mmmmmm
    Commented Sep 9, 2019 at 10:48
  • My evidence: I'm a software engineer and I have run a small business. I also read business magazines and see the same issues that are mentioned above. Actual experience of myself and others is not a "guess". If you want a specific business case you can use Google.
    – Bulrush
    Commented Sep 9, 2019 at 10:55

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.