I installed the latest Calibre version (5.22.1) from
here
After install, I was able to load module javascript files, and see messages from console.log() in the terminal where I launched Calibre from.
Code:
cat EPUB/xhtml/raw/ch1.xhtml
<!--?xml version='1.0' encoding='UTF-8'?-->
<!DOCTYPE html><html xml:lang="en-us" lang="en-us" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:xlink="http://www.w3.org/1999/xlink">
<head>
<script type="module" src="../../js/script2.js"></script>
...
</head>
...
</html>
# --------------------------------------------------------------
cat EPUB/package.opf
...
<item id="js4" href="js/script2.js" media-type="module"/>
When I ran calibre with
Code:
calibre ebook2.epub
script2 works ok.
I can see messages from Console.log() in the terminal.
kovidgoyal, thanks for your help.
Avner