Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Interface IUrlFactory

    Used by several classes in the framework that needs to generate a URL to a resource that is renderable by the browser.

    interface IUrlFactory {
        createUrl(): Promise<string>;
        revokeUrl(url: string): void;
    }

    Methods

    • Creates a URL that can used to render the resource in the browser using an Element appropriate for the resource. This url may be a http(s) a blob:url or a data url.

      Regardless, consumers MUST call revokeUrl() with the url returned by this method to prevent memory leakage.

      Returns Promise<string>

      Resolved with a URL to the resource.

    • Revokes an URL previously created with createUrl().

      Parameters

      • url: string

        The URL to revoke.

      Returns void