interface Options {
    controllerId?: string;
    filters?: ProjectFilters;
    initialProjects: () => Promise<MakeCodeProject[]>;
    onBack?: () => void;
    onBackLongPress?: () => void;
    onDownload?: (download: { hex: string; name: string }) => void;
    onSave?: (save: { hex: string; name: string }) => void;
    searchBar?: boolean;
    onEditorContentLoaded(event: EditorContentLoadedRequest): void;
    onTutorialEvent(event: EditorMessageTutorialEventRequest): void;
    onWorkspaceEvent(event: EditorEvent): void;
    onWorkspaceLoaded(event: EditorWorkspaceSyncRequest): void;
    onWorkspaceReset(event: EditorWorkspaceSyncRequest): void;
    onWorkspaceSave(event: EditorWorkspaceSaveRequest): void;
    onWorkspaceSync(event: EditorWorkspaceSyncRequest): void;
}

Properties

controllerId?: string

Set this to a value representing your app.

filters?: ProjectFilters

Filters affecting the configuration of MakeCode.

initialProjects: () => Promise<MakeCodeProject[]>

A function that provides the initial set of projects to be used when initialising MakeCode.

This will also be used if the iframe reloads itself.

The projects will receive updates via onWorkspaceSave and should be stored keyed by header id.

onBack?: () => void

Requests the embedding app handles a press/tap on the back arrow.

Applies only with controller set to 2.

onBackLongPress?: () => void

Requests the embedding app handles a long press/tap on the back arrow. This is optional.

Applies only with controller set to 2.

onDownload?: (download: { hex: string; name: string }) => void

Requests the embedding app handles a download.

Applies only with controller set to 2.

onSave?: (save: { hex: string; name: string }) => void

Requests the embedding app handles a save.

Applies only with controller set to 2.

searchBar?: boolean

Whether to show the search bar.

Methods