API Documentation for: 1.0.0
Show:

TagRequest Class

Defined in: TagRequest:41
Module: PreloadJS

An AbstractRequest that loads HTML tags, such as images and scripts.

Methods

_clean

() private

Defined in _clean:170

Remove event listeners, but don't destroy the request object

_handleError

() protected

Defined in _handleError:135

Handle any error events from the tag.

_handleError

(
  • event
)
private

Defined in _handleError:159

The tag request has not loaded within the time specified in loadTimeout.

Parameters:

  • event Object

    The XHR error event.

_handleReadyStateChange

() private

Handle the readyStateChange event from a tag. We need this in place of the onload callback (mainly SCRIPT and LINK tags), but other cases may exist.

_handleStalled

() private

Defined in _handleStalled:185

Handle a stalled audio event. The main place this happens is with HTMLAudio in Chrome when playing back audio that is already in a load, but not complete.

_handleTagComplete

() private

Handle the tag's onload callback.

Properties

_addedToDOM

Boolean private

Defined in _addedToDOM:76

Determines if the element was added to the DOM automatically by PreloadJS, so it can be cleaned up after.

_loadedHandler

Function private

Defined in _loadedHandler:68

A method closure used for handling the tag load event.

_tag

HTMLElement protected

Defined in _tag:52

The HTML tag instance that is used to load.

_tagSrcAttribute

String protected

Defined in _tagSrcAttribute:60

The tag attribute that specifies the source, such as "src", "href", etc.