MakeCode Embed
    Preparing search index...

    Class MakeCodeFrameDriver

    A driver for MakeCode.

    This stores state to correlate requests/responses to and from MakeCode.

    Index
    • Create a URL that can be used to import a project into MakeCode.

      This can be useful if MakeCode is embedded in one application but you want to be able to export to non-embedded MakeCode.

      The applications must be part of the same site as the process relies on shared client-side storage.

      The URL must be used immediately as it won't remain valid if another call is made.

      Parameters

      Returns Promise<{ importUrl: string }>

    • Import a tutorial from markdown text.

      See also startActivity.

      Parameters

      • options: { markdown: string }

      Returns Promise<void>

    • Parameters

      • options: { ts: string }

      Returns Promise<string | undefined>

    • Parameters

      • options: { enabled: boolean; intervalSpeed?: number }

      Returns Promise<void>

    • Parameters

      • __namedParameters: { scale: number }

      Returns Promise<void>

    • Stops the simulator.

      Parameters

      • Optionaloptions: { unload: boolean }
        • unload: boolean

          Optionally unload the simulator (removes its UI)

      Returns Promise<void>

    • Switch the MakeCode to blocks mode.

      You can find the current mode in the project.

      Returns Promise<void>

    • Switch the MakeCode to JavaScript mode.

      You can find the current mode in the project.

      Returns Promise<void>

    • Switch the MakeCode to JavaScript mode.

      You can find the current mode in the project.

      Returns Promise<void>

    • Parameters

      • Optionaloptions: { invervalSpeed?: number }

      Returns Promise<void>

    • Returns Promise<void>

      Keyboard controls are always enabled in current MakeCode versions so this does nothing.