API Docs for: 0.0.4
Show:

BundleLoader Class

Defined in: bundleloader.js:1

Load a javascript and run it, and shows a progress bar while doing so.

For making the transition into the actualy application, there are some other features, such as the ability to not make the progress bar go to 100%.

Methods

hide

()

Defined in bundleloader.js:156

Hide the loader.

load

(
  • urls
  • [message]
  • [completeProgress]
)

Defined in bundleloader.js:169

Load javascript.

This function loads the javascript from the specified url, and then runs it.

By default, the loading screen will be hidden when the script is run. If there are extra resources to be loaded as part of the application startup, specify a number for the completeProgress parameter, and the loading screen will not hide itself, but instead stop at the specified percentage.

It is then up to the loaded bundle to actually hide the loader when all resources are loaded.

Parameters:

  • urls String

    Url or array of urls to the javascript main bundle file.

  • [message] String optional

    The message to show while loading.

  • [completeProgress] Number optional

    The progress to stop at.

loadNext

()

Defined in bundleloader.js:210

Load next url.

onAnimateInterval

() private

Defined in bundleloader.js:141

Animate the loader if the size of the load job is not known.

onLoadRequestError

() private

Defined in bundleloader.js:295

On error.

onLoadRequestLoad

() private

Defined in bundleloader.js:261

Load request complete.

onLoadRequestProgress

() private

Defined in bundleloader.js:244

Load request progress.

show

(
  • title
  • [percent]
)

Defined in bundleloader.js:89

Show the loader, with message and optional percent.

The percent parameter is optional. If this is omitted the progress bar will show as in an indefinite state.

Parameters:

  • title String

    The message to show.

  • [percent] Number optional

    The percentage of the completion to show.

showMessage

(
  • title
)

Defined in bundleloader.js:122

Show only a message without the progress bar.

Parameters:

  • title String

waitForBody

() private

Defined in bundleloader.js:75

Wait for the body to exist so we can attach ourselves.