@inweb/viewer-visualize
    Preparing search index...

    Interface ILoader

    Defines the file loader for the viewer.

    interface ILoader {
        name?: string;
        cancel(): void;
        dispose(): void;
        isSupport(file: FileSource, format?: string): boolean;
        load(
            file: FileSource,
            format?: string,
            params?: LoadParams,
        ): Promise<ILoader>;
        yield(): Promise<void>;
    }
    Index

    Properties

    name?: string

    The name of the loader.

    Methods

    • Cancels asynchronous loading started with load().

      Returns void

    • Releases resources allocated by the loader.

      Returns void

    • Returns true if the specified file can be loaded by this loader.

      Parameters

      • file: FileSource

        File to load.

      • Optionalformat: string

        File format string.

      Returns boolean

    • Yields control back to the browser's event loop, allowing UI updates and other pending tasks to execute. This method is used during long-running loading operations to prevent the browser from becoming unresponsive.

      Returns Promise<void>