Interface FormatDetectionParser

Format detection is useful for detecting feature support on the current platform.

Memberof

PIXI

interface FormatDetectionParser {
    add: ((formats) => Promise<string[]>);
    extension?: ExtensionMetadata;
    remove: ((formats) => Promise<string[]>);
    test: (() => Promise<boolean>);
}

Properties

add: ((formats) => Promise<string[]>)

Add formats (file extensions) to the existing list of formats. Return an new array with added formats, do not mutate the formats argument.

Type declaration

    • (formats): Promise<string[]>
    • Parameters

      • formats: string[]

      Returns Promise<string[]>

Returns

  • Promise that resolves to the new formats array.
extension?: ExtensionMetadata

Should be ExtensionType.DetectionParser

remove: ((formats) => Promise<string[]>)

Remove formats (file extensions) from the list of supported formats. This is used when uninstalling this DetectionParser. Return an new array with filtered formats, do not mutate the formats argument.

Type declaration

    • (formats): Promise<string[]>
    • Parameters

      • formats: string[]

      Returns Promise<string[]>

Returns

  • Promise that resolves to the new formats array.
test: (() => Promise<boolean>)

Browser/platform feature detection supported if return true

Type declaration

    • (): Promise<boolean>
    • Returns Promise<boolean>

Generated using TypeDoc