How-To Add Javascript and CSS Files
Back to current version Restore this version

Structure of the javascript#

The javascript content is now structured into namespaces. This was necessary to avoid conflicts between javascript APIs used by JSPWiki itself and source code written for KnowWE. Also the namespace concept introduces clarity into the javascript code and avoids conflicts between KnowWE plugins maybe using the same function name for different purposes.

The KnowWE javascript code knows the following three core namespaces:

The composition of the namespaces is not further structured. But every namespace has a "init" function to summarize functions/actions that are executed during page load and shortly after. This is also only due clarity.

If you write javascript code for KnowWE please use one of the above namespace. New namespaces can also be introduced without any problems. For further information about the content of the namespaces please read the javascript documentation in KnowWE/src/resources/doc/javascript in the SVN repository.