Skip to main content

Function: createPlayground()

createPlayground(container, options)

createPlayground(container, options?): Promise<Playground>

Creates a LiveCodes playground.

Parameters

container: string | HTMLElement

HTMLElement or a string representing a CSS selector. This is the container where the playground is rendered. If not found, an error is thrown (except in headless mode, in which this parameter is optional and can be omitted).

options?: EmbedOptions

The embed options for the playground (optional).

Returns

Promise<Playground>

  • A promise that resolves to a Playground object which exposes many SDK methods that can be used to interact with the playground.

Defined in

index.ts:26

createPlayground(options)

createPlayground(options): Promise<Playground>

Parameters

options: EmbedOptions & object

Returns

Promise<Playground>

Defined in

index.ts:30