![]() |
#1 |
Member
![]() Posts: 24
Karma: 10
Join Date: Aug 2012
Device: iPad
|
No external JS?
I'm developing books with embedded JS and trying to get them to work on the Kobo Touch. I'll be darned if it doesn't completely ignore external JavaScript (<script src="...">), while the same JS pasted directly on the page works just fine. Or maybe I'm missing something...anyone?
Now I just have to figure out how to detect touch events and stop them from propagating--the same code that does all that just fine on iBooks appears to do nothing at all on the Touch. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,217
Karma: 3804496
Join Date: Feb 2012
Location: Ottawa, Ontario, Canada
Device: Kobo Libra 2, Lenovo Tab M10 FHD Plus, Lenovo Tab M9
|
You should check out the developer's forum: https://www.mobileread.com/forums/forumdisplay.php?f=247
|
![]() |
![]() |
![]() |
#3 |
Member
![]() Posts: 24
Karma: 10
Join Date: Aug 2012
Device: iPad
|
Thanks, I did take a look at the Developer's forum, but it seemed to more about hacking and programming the device, whereas I am trying to build smart books to read on it...
|
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 24
Karma: 10
Join Date: Aug 2012
Device: iPad
|
Now I am trying to handle touch events from Javascript within books to be read on the Kobo Touch. I put a simple handler on the body element:
Code:
<body ontouchstart="alert('touched')"> I tried querying navigator.epubReadingSystem.hasFeature("touch-events") (see http://code.google.com/p/epub-revisi...bReadingSystem), but it turns out navigator.epubReadingSystem is not defined on the Kobo Touch, even though the "spec" says Returns an object that represents the current reading system. Every reading system that supports scripting in any fashion MUST provide this object.
|
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,297
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Quote:
So no support for scripting would mean NO need to provide the object |
|
![]() |
![]() |
![]() |
#6 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 355
Karma: 289856
Join Date: Oct 2011
Location: Honolulu, Hawaii
Device: Kobo Touch
|
Quote:
Is scripting an allowed option of the epub format? Would it still be an .epub file in other words. ![]() |
|
![]() |
![]() |
![]() |
#7 | |
Member
![]() Posts: 24
Karma: 10
Join Date: Aug 2012
Device: iPad
|
No, the Kobo Touch does support scripting. It just doesn't, as far as I can tell, support scripts in external files.
Quote:
![]() Scripting is an optional feature of epub3 implementations. Books using scripting are very much still epubs. |
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,297
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
It might support scripting within Kobo format ePubs (kEpubs) but I seriously doubt it supports them within ePubs (ePubs).
You can to a limited way force the Kobo to open a book in the Kobo format engine but this is not supported (and frowned on) by Kobo. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Color Use of external keyboard | notaguru | Nook Color & Nook Tablet | 0 | 04-19-2012 01:35 PM |
External SD | 0bserver92 | Kobo Tablets | 4 | 03-17-2012 11:17 AM |
External Speaker | Senior | Kobo Tablets | 3 | 01-09-2012 02:05 PM |
Accessories External Speaker | Hopi | enTourage Archive | 8 | 03-06-2011 12:41 AM |
Is it possible to an external font to be used? | Semp | Kobo Reader | 1 | 05-03-2010 12:44 PM |