Skip to content

InternalAPI

The internal API provides access to some of js engines internals.

Constructors

new InternalAPI()

new InternalAPI(apiInstance): InternalAPI

Parameters

Parameter Type

apiInstance

API

Returns

InternalAPI

Defined in

jsEngine/api/Internal.ts:14

Methods

createExecutionGlobals()

createExecutionGlobals(options): JsExecutionGlobals

Creates execution globals.

Parameters

Parameter Type Description

options

JsExecutionGlobalsConstructionOptions

Returns

JsExecutionGlobals

Defined in

jsEngine/api/Internal.ts:97


createRenderer()

createRenderer(container, sourcePath, component): ResultRenderer

Creates a result renderer.

Parameters

Parameter Type Description

container

HTMLElement

sourcePath

string

component

Component

Returns

ResultRenderer

Defined in

jsEngine/api/Internal.ts:34


execute()

execute(params): Promise<JsExecution>

Executes the given code.

Parameters

Parameter Type Description

params

EngineExecutionParams

Returns

Promise<JsExecution>

Defined in

jsEngine/api/Internal.ts:23


executeFile()

executeFile(path, params): Promise<JsExecution>

Load and execute the given file.

Parameters

Parameter Type Description

path

string

params

Omit<EngineExecutionParams, "code">

Returns

Promise<JsExecution>

Defined in

jsEngine/api/Internal.ts:44


executeFileSimple()

executeFileSimple(path, params?): Promise<JsExecution>

Lead and execute the given file. This method also handles the lifetime of the execution. The component for the execution is created and destroyed automatically.

Parameters

Parameter Type Description

path

string

params?

Omit<EngineExecutionParams, "code" | "component">

Returns

Promise<JsExecution>

Defined in

jsEngine/api/Internal.ts:62


getContextForFile()

getContextForFile(path): Promise<JsExecutionContext>

Gets the execution context for a specific file, throws when the file does not exist.

Parameters

Parameter Type Description

path

string

Returns

Promise<JsExecutionContext>

Defined in

jsEngine/api/Internal.ts:77