JavaScript is allowed, but not in PDF/A, which is what I use.
The PDF 2.0 spec is damnably not public.