On 2019-10-15, at 06:42, Henning Hraban Ramm
Basically javascript can be limited to (1) setting annotation properties, like toggling layers or button renditions, and (2) some simple calculations (for forms). Constructing pdf runtime using javascript is pretty braindead (use html instead then).
D’accord.
Of course you are aware that limiting a powerful language is not an easy task?
It is one of the puzzling areas to me: no problem in browsers and elsewhere but not in open source pdf viewers. It's not the most complex stuff so it probably indicates that no one cares much about these features.
I wouldn’t say "no problem", because JS causes security problems everywhere.
It's not JS that causes problems. Any other (powerful enough) language not specifically designed with browser environment in mind could be problematic here. I guess that having Perl, Python or Ruby instead of JS would create a similar set of problems. (Lua might be an exception due to its design and a possibility to whitelist functions for eval, AFAIR.) Just 2 cents from a JS programmer who actually thinks that JS is not the worst Lisp dialect out there. Best, -- Marcin Borkowski http://mbork.pl