Question

Recently, I'm trying to convert "Web Project" into "epub".

Before that, I have a simple test as following.

I made a simple HTML file that prints "Hello World" and JavaScript changes the font color.

I convert this HTML file into epub format by Calibre converter.

However, I checked that JavaScript is not working on ePub viewer.

Is there an any way to enable Javascript to work properly after it converted to ePub ?

Was it helpful?

Solution

You should check that your manifest's entry for the XHTML pages on which scripting is used contain the scripted attribute.

You should check that your reader (Galazy Note 10.1 is a piece of hardware, not a reader), I mean the application you are using to read the book, supports scripting, as commenters have mentioned. Modern ones will. You could try Himawari, or Azardi.

Your font color changes may or may not be handled correctly, since various readers may override this in various ways.

Just out of curiosity, what do you mean by "printing"? On the off chance that you are using document.write, don't.

You can check that JavaScript is working in your book by checking that whatever you are doing in JavaScript is actually happening. There is no equivalent of a developer console or debugger.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top