PdfScriptHandler
What a viewer needs from a document's scripts, without knowing how they run.
kitepdf-javascript implements this over KiteJS, and a host may implement it over any other engine. The viewer talks to this interface only, so an app that shows PDFs does not carry a JavaScript engine unless it asks for one.
Every method is allowed to do nothing: a handler that runs no scripts is a valid handler, and a viewer with no handler behaves as it always did.
Properties
Functions
The document opened: run its own scripts and its open action.
The reader typed into a field. change is what is being inserted, replacing the text between selectionStart and selectionEnd.
The reader left this page: run its close script.
The reader reached this page: run its open script.
Runs the timers a script set, and answers how long to wait before the next one, or null when none is waiting. The viewer calls this once a frame while hasTimers is true.
The reader tapped something whose action is a script, such as a link.