@twip/web
    Preparing search index...

    Function preload

    • Downloads and compiles the engine and starts it, so the first Editor.mount, HeadlessEditor.create or FontLibrary call doesn't wait for it. Call it as early as the page knows it will show an editor, with no document and no container. Calls share one load per execution mode, and a failed load is tried again by the next call or editor.

      execution is the mode to prepare, as MountOptions.execution picks it (default 'auto': the worker where the page supports one). The engine it starts is the one every later editor in that mode uses; a preloaded worker stays until the first editor's session has started and closed, as any editor's worker does. Call configure first if the package's files are served from elsewhere: the folder can't change after this.

      Parameters

      • options: { execution?: "auto" | "main" | "worker" } = {}

      Returns Promise<void>

      EditorError unsupported for execution: 'worker' where the page can't run workers; the engine's load error when the module fails to download or compile.