Module xs

XS JavaScript Engine API

See the API Reference and the official XS in C in the Moddable SDK's documentation.

Classes

NameDescription
JSClass A JavaScript class. Subclass a D class with JSClass to expose it to a JS VM.
JSException Thrown when a JS VM is aborted with the xsUnhandledExceptionExit status.
JSObject A JavaScript Object reference.
JSValue A JavaScript value reference.
Machine A JavaScript virtual machine.

Structs

NameDescription
ClassDefinition Properties and callbacks that define a type of Object. All fields other than the version field are optional. Any pointer may be null.
JSStaticFunction Describes a statically declared function property.
JSStaticValue Describes a statically declared value property.

Enums

NameDescription
ClassAttributes A set of JSClass attributes. Combine multiple attributes with bitwise OR.
PropertyAttributes A set of JSObject property attributes. Combine multiple attributes with bitwise OR.

Templates

NameDescription
defaultFxAbort A rudimentary Host VM abortion implementation that throws error messages back into the JS VM.