I’m starting playing with kobo ereader and epub 3 format.
I’ts xhtml5, on kobo ereader with the kepub.epub js are running.
I’m able to run basic script and attempt to use P5js, to use it canvas abilities…
I’ve tried to import lib
I’ve try a simple exemple on canvas with js, and it works on the kobo.
<body>
<canvas id="myCanvas" width="200" height="100" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.arc(95,50,40,0,2*Math.PI);
ctx.stroke();
</script>
</body>
I’m not an epub3 expert by any means, but this doesn’t look right – I think you javascript resources need to be stored in a specific place and then listed in a manifest, maybe?
So be careful not to leave out the declaration highlighted in bold above. Also, any and all resources referenced in your HTML content need to be listed in the OPF <manifest> . Here’s a sample manifest <item> for an external JavaScript file
oh f…
i’m sorry, i did not see your answer.
i use Sigil for making epub, it realise all the statements in the opf…
thanks for your time…
Kobo have an old js interpreter. it does not like es6 js style…
love the idea to code on a kobo ereader, but it’s to hard to code in backward style…