Apparently, it is not possible for the Kindle Reader but I'm wondering if it is possible with another device?
EPUB Content Documents may contain scripting using the facilities defined for this in the respective underlying specifications ([HTML5] and [SVG]).
› It must support container-constrained scripting and may support spine-level scripting.
› It may render Scripted Content Documents as an interactive, scripted User Agent according to [HTML5].
› It must not allow a container-constrained script to modify the DOM of the parent Content Document or other contents in the EPUB Publication, and must not allow it to manipulate the size of its containing rectangle. (Note: Even if a script is not container-constrained, the Reading System may impose restrictions on modifications (see also the dom-manipulation feature).)
› It may place additional limitations on the capabilities provided to scripts during execution (e.g., limiting networking).
› It must regard the scripted [Publications301] property of the Package Document manifest item element as the authoritative definition of whether an EPUB Content Document includes scripting.
For example, iPads/iPhones with iBooks and Android tablets with Gitden Reader (which is also available for iOS.)