The JavaScript is modular and based on a base module that is initialised when the page is called. It creates a global object with the name goobiWorkflowJS. Methods are attached to this object through further modules and can thus be called in its scope.
The global object goobiWorkflow is passed to the add-on module, thus allowing the object to be extended with additional methods. In a module, methods or variables can be defined that can only be called in the module (private) or in the global object(public).