Package-level declarations

Types

Link copied to clipboard
class EpubScriptPolicy(val enabled: Boolean = true, val budgetMillis: Long, val instructionBudget: Int = 0)

What a book's scripts are allowed to do, and for how long (#41).

Link copied to clipboard
class EpubScriptRunner(val document: EpubDocument, val policy: EpubScriptPolicy = EpubScriptPolicy(), onConsole: (level: String, message: String) -> Unit = { _, _ -> }, clock: () -> Long? = null, instanceKey: String? = null, fontOutlines: (text: String, font: FontSpec) -> KitePath?? = null) : EpubScriptHandler, AutoCloseable

Runs the scripts of a book on KiteJS, for KiteDocView or any other host (#41).

Link copied to clipboard
class KiteJsScriptEngine(val instructionBudget: Int = DEFAULT_INSTRUCTION_BUDGET, deadline: () -> Boolean? = null, clock: () -> Long? = null, sealBuiltins: Boolean = true, maxStackBytes: Long = DEFAULT_STACK_BYTES) : KiteScriptEngine

A KiteScriptEngine that runs on KiteJS.

Link copied to clipboard

A message a script asked to show, through app.alert.

Link copied to clipboard
class PdfScriptPolicy(val enabled: Boolean = true, val budgetMillis: Long, val documentBudgetMillis: Long = 0, val instructionBudget: Int = 0, val onStillRunning: (elapsedMillis: Long) -> Boolean? = null)

What a document's scripts are allowed to do, and for how long.

Link copied to clipboard

A question a script asked, through app.response.

Link copied to clipboard
sealed class PdfScriptRequest

What a script asked the host to do, when it wants something outside the document.

Link copied to clipboard
class PdfScriptRunner(document: PdfDocument, val formState: PdfFormState = PdfFormState(document), val policy: PdfScriptPolicy = PdfScriptPolicy(), onAlert: (PdfScriptAlert) -> Int = { 1 }, onConsole: (String) -> Unit = {}, onRequest: (PdfScriptRequest) -> Unit = {}, onResponse: (PdfScriptPrompt) -> String? = { null }, clock: () -> Long? = null, engine: KiteScriptEngine? = null) : PdfScriptHandler, AutoCloseable

Runs the JavaScript a PDF carries: its document scripts, the actions of its pages and buttons, and the four scripts a form field runs while it is filled.