API Documentation for: 0.6.0
Show:

JSONPLoader Class

Defined in: JSONPLoader:41
Module: PreloadJS

A loader for JSONP files, which are JSON-formatted text files, wrapped in a callback. To load regular JSON without a callback use the JSONLoader instead. To load JSON-formatted manifests, use ManifestLoader, and to load EaselJS SpriteSheets, use SpriteSheetLoader.

Constructor

JSONPLoader

(
  • loadItem
)

Defined in JSONPLoader:41

Parameters:

Item Index

Methods

_dispose

() private

Defined in _dispose:116

Clean up the JSONP load. This clears out the callback and script tag that this loader creates.

_handleLoad

(
  • The
)
private

Defined in _handleLoad:103

Handle the JSON callback, which is a public method defined on window.

Parameters:

  • The Object

    formatted JSON data.

canLoadItem

(
  • item
)
Boolean static

Defined in canLoadItem:61

Determines if the loader can load a specific item. This loader can only load items that are of type JSONP.

Parameters:

  • item LoadItem | Object

    The LoadItem that a LoadQueue is trying to load.

Returns:

Boolean:

Whether the loader can load the item.