API Documentation for: 1.0.0
Show:

RequestUtils Class

Defined in: RequestUtils:36
Module: PreloadJS

Utilities that assist with parsing load items, and determining file types, etc.

Item Index

Methods

Methods

getTypeByExtension

(
  • extension
)
String static

Determine the type of the object using common extensions. Note that the type can be passed in with the load item if it is an unusual extension.

Parameters:

  • extension String

    The file extension to use to determine the load type.

Returns:

String:

The determined load type (for example, createjs.Types.IMAGE). Will return null if the type can not be determined by the extension.

isBinary

(
  • type
)
Boolean static

Defined in isBinary:42

Determine if a specific type should be loaded as a binary file. Currently, only images and items marked specifically as "binary" are loaded as binary. Note that audio is not a binary type, as we can not play back using an audio tag if it is loaded as binary. Plugins can change the item type to binary to ensure they get a binary result to work with. Binary files are loaded using XHR2. Types are defined as static constants on AbstractLoader.

Parameters:

Returns:

Boolean:

If the specified type is binary.

isText

(
  • type
)
Boolean static

Defined in isText:63

Determine if a specific type is a text-based asset, and should be loaded as UTF-8.

Parameters:

Returns:

Boolean:

If the specified type is text.