Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript support #33

Open
outsideMyBox opened this issue Apr 10, 2017 · 4 comments
Open

Javascript support #33

outsideMyBox opened this issue Apr 10, 2017 · 4 comments

Comments

@outsideMyBox
Copy link

Hi,

The chapter "Javascript support" states that

Kobo’s Android and iOS platforms support JavaScript for Fixed Layout and reflowable ePubs [...] Kobo’s eInk and Desktop platforms have limited support for JavaScript, and do not support interactive JavaScript elements

and

Note that navigator.epubReadingSystem property is only supported on Kobo's Desktop and eInk platforms and is not presently supported on iOS, Android or Windows.

Why is the navigator.epubReadingSystem not supported for iOS, Android or Windows? It's confusing as later the chapter "support Grid" states that JS is supported for Android and iOS but not for Desktop, eInk, Windows.
Furthermore, according to the EPUB3 spec :

A Reading System that supports scripting must meet the following criteria:
[...] It must implement the JavaScript navigator extension object epubReadingSystem defined in Appendix B, JavaScript epubReadingSystem Object. It also must support the dom-manipulation and layout-change features defined in Features in container-constrained scripting contexts.

@bdugas
Copy link
Contributor

bdugas commented Jun 16, 2017

@outsideMyBox we have logged this issue and hope to have support added for Android and iOS. If you have a sample file you can pass along we'd be happy to use it to verify the fix once it's been implemented.

@outsideMyBox
Copy link
Author

Hi,
thanks for looking into this. Unfortunately I don't have a simple example I could share now. I'll test and share an epub once I've got one.

@bdugas
Copy link
Contributor

bdugas commented Jun 18, 2017

Thanks. Not getting one from you shouldn't hold up our progress but if you can sent one I will attach it to the development request.

@mrbbp
Copy link

mrbbp commented May 6, 2020

Hello,

i complete the thread with an example attached with js generated content, with a localStorage (does not work on eink, have to add a trycatch) supposed to add a number in the h2 tag of the generated content.

activites.kepub.epub.zip
(just remove ".zip" useless extension for github compliance)

regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants