Package-level declarations
Types
How loud a console message is.
One console message, already formatted.
Where console.log and its neighbours end up. Every engine formats the arguments the same way before they get here: separated by spaces, with %s, %d, %i, %f, %o, %O and %c in a leading string filled in, as a browser console does.
Printers you probably want.
The fixed table between Kotlin values and JavaScript values. Nothing here uses reflection, so it works the same on every target and for every engine.
Marks the parts of this API that exist for the engines implementing it, not for the code that embeds an engine. An application builds a KiteJs from an engine and works with the handles it gives out; it never needs these.
A JavaScript engine a KiteJs can run on. Each engine module has one, an object you pass to KiteJs: Rhino from kitejs-rhino, QuickJs from kitejs-quickjs. C is the engine's own configuration, which has everything KiteJsConfig has plus what only that engine can do.
The engine itself could not go on: it is closed, misused, out of budget or out of memory.
A script threw. value is whatever it threw, which is usually an Error but need not be.
Anything the API throws. Every case is one of the three below.
A JavaScript function seen from Kotlin.
A promise the host controls: hand promise to the script, settle it when you are ready.
One frame of a script's own call stack.
The source did not parse.
The undefined a JsValue holds. Engines compare against it when they turn a value into their own; nothing else needs it, since JsValue.isUndefined answers the question.
An arbitrary-precision integer: what BigInt values are made of.
An engine and the global scope that goes with it. One instance belongs to the thread that opened it: use it and close it there.
How to build an engine: what every engine understands. Everything has a working default, and an engine's own configuration adds what only it can do.
Which primitive an object is asked for, as the ECMAScript ToPrimitive hint.
How a property behaves. The defaults match what obj.x = 1 gives you in a script.
Properties
True when this value is thenable, which is what await looks for: an object, an array or a function whose then is callable. Reading then can run a getter, so for those this needs the value's engine open and on this thread, and a getter that throws reaches you as a JsError. Every other value answers false without touching an engine.
Functions
A host constructor, callable with new. build fills in the object it is given.
A one-argument host function, with the argument and the answer converted for you.
A two-argument host function.
A three-argument host function.
A host function that takes the arguments as they came.
A promise the host settles later.