Module jsolait
This is the main module.It is used by all jsolait modules and provides the basic functionality.
public members:▲
baseURL
The base URL to use when dynamically loading user modules.
libURL
The url of the jsolait installation, used for dynamically loading jsolait modules.
ModuleImportFailed()
Exception thrown when a module could not be imported.
importModule(moduleName)
Imports a module given its name(e.g. "someModule.someSubModule").
For dynamic loading of modules:
A module's file location is determined by treating each module name as a directory.
Only the last one is assumed to point to a file.
If the module's URL is not known to jsolait then it will be searched for in jsolait.baseURL which is "." by default.
For dynamic loading of modules:
A module's file location is determined by treating each module name as a directory.
Only the last one is assumed to point to a file.
If the module's URL is not known to jsolait then it will be searched for in jsolait.baseURL which is "." by default.
reportException(e)
Displays an Exception
This is better than
e
and it's trace.This is better than
alert(e)
.
globals:▲
jsolait
The jsolait module.
Class(className, superClass, classScope)
A method for creating Classes.
The
The
Each class created by this method has the following properies and methods:
The
className
parameter is not needed if the Class is going to be a public member of a module.The
superClass
parameter must be specified if the new class is to be a subclass of the class specified by superClass
.
The classScope
is a ClassScope
function and defines the scope of the class.Each class created by this method has the following properies and methods:
- className The name of the class.
- superClass The super class of the class
Module(name, version, moduleScope)
A method for creating modules.
The
The
The
Modules created with this function have the following properties:
The
name
parameter defines the name of the module.The
version
parameter contains the version of the module.The
moduleScope
is a ModuleScope
function and defines the scope of the module.Modules created with this function have the following properties:
- name The name of the module.
- version The module's version.
- Exception The base class for all exception classes in the module.
importModule(moduleName)
The globalized jsolait.importModule method.
reportException(e)
The globalized jsolait.reportException method.
interfaces:▲
ClassScope(publ, supr)
The ClassScope is a function which is called by the Class method when a new class is constructed.
The
All objects added to this object become public members of the new class.
The
Everything declared with var inside the scope becomes "private" to the scope, i.e. is only visible within the scope.
The
publ
parameter contains the new class' prototype object.All objects added to this object become public members of the new class.
The
supr
parameter contains a wrapper function for easyly calling the super class' methodsEverything declared with var inside the scope becomes "private" to the scope, i.e. is only visible within the scope.
ModuleScope(mod)
The ModuleScope is a function which is called by the Module function when a new module is created.
All objects added to the
It will already contain the modules porperties like name, version and the Exception class.
All objects added to the
mod
parameter will become public members of the module.It will already contain the modules porperties like name, version and the Exception class.
requirements:▲
For dynamic loading of modules a synchronous HTTP connection must be available. Mozilla and IE both have it.