Answers.Body: <p>I don't believe any reader 'fully' supports EPUB3, in part because the EPUB3 and its satellite specs (e.g. <a href="http://www.idpf.org/epub/oa/" rel="nofollow noreferrer">annotation</a>, <a href="http://www.idpf.org/epub/do/" rel="nofollow noreferrer">distributable objects</a>, <a href="http://www.idpf.org/epub/widgets/" rel="nofollow noreferrer">widgets</a>) are so broad that it's not viable for any one reader to implement it all.</p>
  
  <p>On Windows, your best options may be <a href="https://www.adobe.com/solutions/ebook/digital-editions/download.html" rel="nofollow noreferrer">Adobe Digital Editions</a> and <a href="https://calibre-ebook.com/" rel="nofollow noreferrer">Calibre</a>. More detail below.</p>
  
  <p>The <a href="https://readium.org/" rel="nofollow noreferrer">Readium</a> project is an open attempt to provide a framework for reader developers with the widest possible support. The <a href="https://chrome.google.com/webstore/detail/readium/fepbnnnkkadjhjahcafoaglimekefifl" rel="nofollow noreferrer">Readium Chrome app</a> is a Readium EPUB3 reader, but now that Google has deprecated Chrome Apps it is no longer maintained.</p>
  
  <p>There are readers that support a large proportion of Javascript, though not everything. And this support is poorly documented and hard to debug:</p>
  
  <ul>
  <li>iBooks supports Javascript on "iBooks 1.5 or later and iOS 5.0 or later; macOS X Mavericks 10.9 or later". <a href="https://help.apple.com/itc/booksassetguide/en.lproj/static.html" rel="nofollow noreferrer">This internal Apple document</a> has details on JS support. It's also <a href="http://epubsecrets.com/how-to-access-the-web-inspector-for-desktop-ibooks.php" rel="nofollow noreferrer">possible to enable dev tools</a> (aka Web Inspector) in iBooks.</li>
  <li>The R2 Reader, which is essentially Readium, is available <a href="https://itunes.apple.com/us/app/r2-reader/id1363963230?mt=8" rel="nofollow noreferrer">for iOS</a> and <a href="https://play.google.com/store/apps/details?id=org.readium.r2reader&amp;hl=en_US" rel="nofollow noreferrer">Android</a>. Readium uses the operating system's default browser engine, and as such supports a lot of Javascript.</li>
  <li>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).</li>
  <li><a href="https://calibre-ebook.com/" rel="nofollow noreferrer">Calibre</a> 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.</li>
  <li>The <a href="http://www.daisy.org/daisypedia/azardi-epub-reader-windows" rel="nofollow noreferrer">AZARDI reader</a> from Infogrid Pacific supports Javascript. I find its UI confusing and its CSS support patchy, too.</li>
  <li>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 <a href="https://support.microsoft.com/en-us/help/4522355/windows-10-update-kb4522355" rel="nofollow noreferrer">removed epub support from Edge in October 2019</a>. It's unlikely that epub support will return <a href="https://www.reddit.com/r/Windows10/comments/cbcsyz/how_to_use_epub_in_edge_chromium/" rel="nofollow noreferrer">in future</a> when Edge <a href="https://blogs.windows.com/windowsexperience/2018/12/06/microsoft-edge-making-the-web-better-through-more-open-source-collaboration/#p4xBTcVeKWqAB5gA.97" rel="nofollow noreferrer">switches its rendering engine to Chromium</a>.</li>
  </ul>
  
  <p>At the moment, <a href="https://support.google.com/books/partner/answer/3316879?hl=en" rel="nofollow noreferrer">Google Play Books documentation says</a> it does not support any Javascript:</p>
  
  <blockquote>
    <p>Google Play Books doesn't support non-standard audio or video tags, or interactive functionality such as that enabled by JavaScript code.</p>
  </blockquote>
  
  <p>FYI, <a href="https://ebooks.stackexchange.com/questions/5942/embed-javascript-in-an-e-book-using-an-e-reader">this Ebooks question</a> from a few years ago is similar.</p>
  
  <p><strong>UPDATE</strong> Jiminy Panoz maintains the excellent Blitz framework, and he <a href="https://twitter.com/JiminyPan/status/1165606976409223169" rel="nofollow noreferrer">says</a> the following ereaders support Javascript. I've not tested these myself.</p>
  
  <blockquote>
    <ul>
    <li>Kobo on iOS and Android</li>
    <li>Readium-based apps in general e.g. CloudShelf Reader, Bookari, Helicon, Lis-a, LEA reader, Infinity Reader.</li>
    <li>Lektz, Gitden on Android/iOS</li>
    <li>Reasily on Android</li>
    <li>Vitalsource Bookshelf on desktop</li>
    <li>Bookworm on Linux</li>
    </ul>
  </blockquote>
  
  <p>For more information on various aspects of reader support, see his <a href="https://github.com/FriendsOfEpub/blitzck-cli/blob/master/data/supportdata.json" rel="nofollow noreferrer">support data here</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-27T08:38:15.840Z
Answers.Text: 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.
Answers.UserDisplayName: otah007
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-25T07:43:04.593Z
Answers.LastActivityDate: 2020-01-06T15:27:30.637Z
Answers.LastEditDate: 2020-01-06T15:27:30.637Z
Answers.UserDisplayName: Arthur
Answers.Body: <p>As far as I know, the major ebook reading systems don't support scripting even though it's in the epub3 <a href="https://w3c.github.io/publ-epub-revision/epub32/spec/epub-contentdocs.html#sec-scripted-content" rel="nofollow noreferrer">(and 3.2</a>)  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. </p>
  
  <p>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.  </p>
  
  <p>One thing I'd check is whether the content creation tools specific to a reading system have some built in scripts (like <a href="https://www.apple.com/ibooks-author/" rel="nofollow noreferrer">ibooks-author</a>). Ibooks have <a href="https://www.apple.com/ibooks-author/gallery.html" rel="nofollow noreferrer">certain interactive widgets</a> which might accomplish what you want. Of course, that means you are designing for a single platform only. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-22T16:06:24.727Z
Answers.Text: 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.
Answers.UserDisplayName: otah007
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-22T14:41:26.000Z
Answers.LastActivityDate: 2019-08-22T14:41:26.000Z
Answers.UserDisplayName: idiotprogrammer
Answers.Body: <p>It's unlikley that companies who make an ereader app will support Javascript as it makes a <em>potential</em> security hole and the companies don't want the liability. </p>
  
  <ol>
  <li>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. </li>
  <li>Any new features could possibly introduce more liability than the company wants. </li>
  <li>The ereader company may not have the personnel with skills to implement JS on a hardware ereader. </li>
  <li>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.</li>
  <li>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. </li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-08T13:15:02.480Z
Answers.Text: 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.
Answers.UserDisplayName: mmmmmm
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-09T10:37:26.293Z
Answers.Text: @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?
Answers.UserDisplayName: Bulrush
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-09T10:48:16.050Z
Answers.Text: No - as you are just guessing - it all seems possible but what evidence do you have that those were the reasons
Answers.UserDisplayName: mmmmmm
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-09T10:55:41.087Z
Answers.Text: 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.
Answers.UserDisplayName: Bulrush
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-07T13:09:03.317Z
Answers.LastActivityDate: 2019-09-09T10:38:31.770Z
Answers.LastEditDate: 2019-09-09T10:38:31.770Z
Answers.UserDisplayName: Bulrush
Body: <p>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:</p>
  
  <ul>
  <li>Windows 10</li>
  <li>Max OS X</li>
  <li>Android</li>
  <li>iOS</li>
  </ul>
  
Tags: <epub><windows>
Title: Which major eBook reading applications support JavaScript?
UserDisplayName: otah007
ThreadText: # Which major eBook reading applications support JavaScript?
  
  (Asked by: username_0 on 2019-08-20)
  
  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
  
  **Tags:** epub, windows
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2019-08-25. Score: 5 | Accepted answer
  
  I don't believe any reader 'fully' supports EPUB3, in part because the EPUB3 and its satellite specs (e.g. [annotation](http://www.idpf.org/epub/oa/), [distributable objects](http://www.idpf.org/epub/do/), [widgets](http://www.idpf.org/epub/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](https://www.adobe.com/solutions/ebook/digital-editions/download.html) and [Calibre](https://calibre-ebook.com/). More detail below.
  
  The [Readium](https://readium.org/) project is an open attempt to provide a framework for reader developers with the widest possible support. The [Readium Chrome app](https://chrome.google.com/webstore/detail/readium/fepbnnnkkadjhjahcafoaglimekefifl) 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](https://help.apple.com/itc/booksassetguide/en.lproj/static.html) has details on JS support. It's also [possible to enable dev tools](http://epubsecrets.com/how-to-access-the-web-inspector-for-desktop-ibooks.php) (aka Web Inspector) in iBooks.
  * The R2 Reader, which is essentially Readium, is available [for iOS](https://itunes.apple.com/us/app/r2-reader/id1363963230?mt=8) and [Android](https://play.google.com/store/apps/details?id=org.readium.r2reader&hl=en_US). 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](https://calibre-ebook.com/) 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](http://www.daisy.org/daisypedia/azardi-epub-reader-windows) 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](https://support.microsoft.com/en-us/help/4522355/windows-10-update-kb4522355). It's unlikely that epub support will return [in future](https://www.reddit.com/r/Windows10/comments/cbcsyz/how_to_use_epub_in_edge_chromium/) when Edge [switches its rendering engine to Chromium](https://blogs.windows.com/windowsexperience/2018/12/06/microsoft-edge-making-the-web-better-through-more-open-source-collaboration/#p4xBTcVeKWqAB5gA.97).
  
  At the moment, [Google Play Books documentation says](https://support.google.com/books/partner/answer/3316879?hl=en) 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](https://ebooks.stackexchange.com/questions/5942/embed-javascript-in-an-e-book-using-an-e-reader) from a few years ago is similar.
  
  **UPDATE** Jiminy Panoz maintains the excellent Blitz framework, and he [says](https://twitter.com/JiminyPan/status/1165606976409223169) 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](https://github.com/FriendsOfEpub/blitzck-cli/blob/master/data/supportdata.json).
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  ### Answer by username_2 on 2019-08-22. Score: 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](https://w3c.github.io/publ-epub-revision/epub32/spec/epub-contentdocs.html#sec-scripted-content)) 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](https://www.apple.com/ibooks-author/)). Ibooks have [certain interactive widgets](https://www.apple.com/ibooks-author/gallery.html) which might accomplish what you want. Of course, that means you are designing for a single platform only.
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  ### Answer by username_3 on 2019-09-07. Score: 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.
  
  > **Comments:**
  > **username_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.  
  > **username_3**: @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?  
  > **username_4**: No - as you are just guessing - it all seems possible but what evidence do you have that those were the reasons  
  > **username_3**: 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.  
  
  ---
  
  