News for hackers. Stuff that matters.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by MatthewPhillips on Friday June 17, 2011 @10:06AM (#2665527)
I had no idea epub allowed js in the spec. My reactionary opinion on this is negative. Why do we need this? What reason is there to have js in epub when we already have js in html? What distinction will there be between html and epub if they are both just document formats that can also execute js?
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by mofle on Friday June 17, 2011 @10:28AM (#2665610)
JavaScript isn't in the current ePub 2.0 spec. Though it is suggested in the 3.0 draft. Like Apple extended ePub 2.0 with audio/video support, they seem to either support it or not prevent it.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by smackfu on Friday June 17, 2011 @10:38AM (#2665645)
Does the standard even really matter, since the content is wrapped in DRM anyways and can only be played in the eBooks app?
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by glhaynes on Friday June 17, 2011 @11:04AM (#2665766)
It does to producers, who often target multiple ebook platforms.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by tjogin on Friday June 17, 2011 @10:21AM (#2665579)
So the good thing about ePub was that it was less capable than HTML, and now they've made ePub worse by making it better?
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by MatthewPhillips on Friday June 17, 2011 @10:58AM (#2665741)
Possibly, like I said it was my reactionary opinion. However being limited by design can be a good thing.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by lucaswoj on Friday June 17, 2011 @09:59AM (#2665497)
As a web developer who specializes in JavaScript, I'm really thrilled -- but as a person who reads books, I'm a little worried. What does the iTunes approval process for iBooks look like? Will any kind of HIG be enforced on the books? Do book publishers have good taste in interactivity? If I wanted interactivity, I would go to the internet.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by joshuacc on Friday June 17, 2011 @09:57AM (#2665494)
This brings a lot of interesting possibilities to technical books. End-of-chapter review questions that are automatically graded being the most obvious.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by d0m on Friday June 17, 2011 @11:01AM (#2665754)
Or background/animated images in children' books. Or dynamic content adjusting to what you already know / had already read. I.e. I know what a prototype is, automatically, all the chapters/paragraphs explaining it could be hidden.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by ipardo on Friday June 17, 2011 @03:02PM (#2666663)
There are plenty of books with webkit animations already in the bookstore.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by rakkhi on Friday June 17, 2011 @09:59AM (#2665498)
Hm... interesting security implications depending on how the code executes, what external info/code it can call
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by Someone on Saturday June 18, 2011 @08:19AM (#2668468)
I agree. Logical follow-up questions would be:

- is this using the fast JavaScript JIT (http://news.ycombinator.com/item?id=2666763)?

- what API is available to eBook JavaScript? Can one make Ajax calls? How much of the book's content can one replace? Make permanent changes to book content?

- Depending on e answers, what differences remain between eBook reader and web browser?

Re:Apple accepts Javascript in EPUB ebooks in iBookstore by rm-rf on Friday June 17, 2011 @10:04AM (#2665522)
So my ebooks can now contain executable root kits.

Cool.

Re:Apple accepts Javascript in EPUB ebooks in iBookstore by tobylane on Friday June 17, 2011 @10:50AM (#2665695)
Javascript is pretty well jailed up, you can't communicate with local and remote files in the same javascript file.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by rm-rf on Friday June 17, 2011 @11:19AM (#2665820)
How is this different than Adobe Reader, where the ability to execute code within a document reading application has resulted in world wide exploits of operating systems?

If my document reader can execute any code in any language, then any document that I read has the potential to execute malicious code on my computer, and I now have an exploit vector that I need to consider when downloading documents & opening e-mail attachments.

I understand that the code can be sandboxed, but before I implicitly trust the sandboxing technology, I'd have to see an example of an unexploitable sandbox. I don't know of any - but that doesn't mean they don't exist.

Re:Apple accepts Javascript in EPUB ebooks in iBookstore by tobylane on Friday June 17, 2011 @03:34PM (#2666773)
Adobe gives the same access it has to save to any folder on the drive, to the scripts in the PDF. Apple doesn't make those kind of mistakes.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by rakkhi on Friday June 17, 2011 @11:53AM (#2665961)
Chrome one has stood up the best thus far
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by ComputerGuru on Friday June 17, 2011 @02:05PM (#2666465)
Right, but "the best" being a very misleading term for anyone not in the know. It too has failed to do the job.. But, of course, no code is perfect. Just keep that in mind.

http://www.informationweek.com/news/security/attacks/2295000...

Re:Apple accepts Javascript in EPUB ebooks in iBookstore by daeken on Friday June 17, 2011 @10:59AM (#2665744)
That sort of protection has nothing to do with js, but rather the browser, which isn't in play here.

Edit: It's implemented via Mobile Safari, as pointed out by justincormack -- this comment is invalid.

Re:Apple accepts Javascript in EPUB ebooks in iBookstore by evinfinite on Friday June 17, 2011 @11:09AM (#2665785)
I find it rather silly to be worried about security given that Apple's one of the largest browser vendors in the world, directly or indirectly via WebKit.

More accurately: all increasing of capabilities in non-immediately-apparent sources IS cause for concern. But that has to be weighted against the exhibited competence of the vendor. I find it unlikely that we-vet-everything our-brand-name-is-safe-computing-experiences Apple wouldn't have considered security in this move.

Re:Apple accepts Javascript in EPUB ebooks in iBookstore by rm-rf on Friday June 17, 2011 @11:23AM (#2665841)
Presumably they have. But given the number of times Safari has been remotely exploitable in the past, that's not necessarily reassuring.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by justincormack on Friday June 17, 2011 @11:09AM (#2665782)
iBooks is implemented using mobile Safari, so the security model is the same.

It uses CSS3 columns to make the pages going across.

Re:Apple accepts Javascript in EPUB ebooks in iBookstore by daeken on Friday June 17, 2011 @11:42AM (#2665914)
Ah hah, I was mistaken. Thanks!
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by kmfrk on Friday June 17, 2011 @11:12AM (#2665800)
I was worried about the direction of iBooks and the growing interest in making app-based books instead of using the native iBooks store. This makes me more optimistic about the future of iBooks.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by justincormack on Friday June 17, 2011 @09:57AM (#2665491)
Previously, in a kind of reverse thing, any booklike app that didn't have interactivity was refused as a normal app and had to go in the iBook store. But interactivity ie Javascript in iBooks did not seem to be allowed.

The ePub committee spent a lot of time trying to decide if ePub was just a browser and what an eBook was, but maybe Apple have decided.

Not sure they would accept an HTML5 game as an iBook though. A kids book with puzzles in might work though and still sell as a book not an app.

Re:Apple accepts Javascript in EPUB ebooks in iBookstore by soapdog on Friday June 17, 2011 @12:53PM (#2666204)
An Young Girl Illustrated Primer, or, Diamong Age here we go!
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by nivals on Friday June 17, 2011 @10:29AM (#2665614)
This is fantastic. I'm glad to see Apple doing what they do best... enabling content developers to be creative. Adobe has a long way to go.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by BasDirks on Friday June 17, 2011 @11:08AM (#2665778)
"Photoshop CS4 supports scripts written in AppleScript, JavaScript or VBScript. ..."

etc.. :)

What would you like to see from Adobe to change your mind?

Re:Apple accepts Javascript in EPUB ebooks in iBookstore by evinfinite on Friday June 17, 2011 @11:11AM (#2665795)
Not rendering magazines as 500MB packs of PNGs would be a start.
Re:Apple accepts Javascript in EPUB ebooks in iBookstore by nivals on Friday June 17, 2011 @01:22PM (#2666303)
Bingo. Their magazine viewer is bloated. RMSDK is garbage. Start by bringing their expertise in layout and fonts to things that people are actually using. Namely, WebKit and JS.