Namespace: rlBoot

rlBoot

A project using Refugee Lib needs to include only a single script:
<script type="text/javascript" src="./script/rlBoot.js></script>
Then utilize rlBoot.bootRefugeeLib to load and initialize the rest of the library.

example: 01-quickstart

Methods

(static) bootRefugeeLib(divIdForMessages, additionalScriptURLs, bootContext, mainFunc, clearDivOnSuccess)

Initializes Refugee Lib scripts, optionally loads additional scripts, calls a main function afterwards and displays boot progress.

Parameters:
Name Type Description
divIdForMessages string

the DOM id of a div tag which will be used to display progress messages

additionalScriptURLs Array.<string>

URLs to additional scripts to load after the Refugee Lib scripts have been loaded

bootContext object

set to "this" and call from the global namespace inside the main HTML file (or to any other object implementing the "eval" function)

mainFunc rlBoot~mainFunc

will be called after booting

clearDivOnSuccess boolean

set to true, if the div for boot messages should be cleared and hidden after a successful boot process

See:
Returns:

whatever the given rlBoot~mainFunc returns

(static) bootRefugeeLibMinimal()

(experimental/todo) boot a minimal interface-less subset of Refugee Lib functionality

Type Definitions

mainFunc(bootCode)

Function signature for use with bootRefugeeLib.

Parameters:
Name Type Description
bootCode number

receives the result of the library boot progress (0 on success)