Gamalto

Fork me on GitHub

Object BaseLibrary Overview

Gamalto. BaseLibrary

new Gamalto.BaseLibrary()

Base object to implement resources managers. It's not meant to be used directly by the client code.

Extends

Members

tag :object

inherited

Utility property to exchange data between objects.

Inherited From

Methods

clone() object

inherited abstract

Clones the object. It will be shallow copy unless otherwise specfied.

Inherited From
Returns
  • New instance of the object. Defaults to null.

getItem(name) object

Gets a resource from the library.

Parameters
Name Type Description
name string

Name of the resource.

Returns
  • Requested item if it exists.

hasItem(name) boolean

Tests whether a resource is available.

Parameters
Name Type Description
name string

Name of the resource.

Returns
  • True is the resource exists and has been properly loaded.

load() Promise

Tries to load all the resources pushed into the library.

Returns
  • Promise to handle the loading states.

pushItem(name, src)

Pushes a new resource into the list.

Parameters
Name Type Description
name string

Name of the resource.

src string

Location of the item to load.

toString() string

inherited abstract

Converts the object into a string.

Inherited From
Returns
  • string

unloadItem(name)

Releases the resource.

Parameters
Name Type Description
name string

Name of the resource.

Documentation generated by JSDoc 3.3.2 on Sun Sep 13 2015 20:13:31 GMT+0200 (CEST)