Issue Bug Closed

#72704Global RequireJS modules must not be loaded multiple times

Markus Klein 01/14/16, 16:42 updated 10/21/17, 17:46

Description

There are several JS modules which are subject to be loaded only once in a context (eg the BE).
These modules must also be loadable in other contexts like popups and iframes.

Since the PHP code usually does not know in which context is gets loaded (module frame or popup), it will of course always load the JS modules, which is ok.
The modules, though, must check if it has already been loaded a more global scope and must then return this very instance.

The basic principle has already been implemented for Storage.js and can be copied for other JS modules.

The localization labels, currently created dynamically in PHP, are a special case, which should be handled in a dedicated issue.

Reviews 4