deprecated egw.includeJS() in favor of es6 import statement

with egw composition happening in main window the used import statement happens in that context and NOT in the window (eg. popup or iframe) this module is instantiated for!
This commit is contained in:
Ralf Becker
2021-07-09 17:27:22 +02:00
parent 4f95ebb510
commit a5ad691757
9 changed files with 12 additions and 62 deletions

View File

@ -141,11 +141,15 @@ egw.extend('files', egw.MODULE_WND_LOCAL, function(_app, _wnd)
/**
* Load and execute javascript file(s) in order
*
* Deprecated because with egw composition happening in main window the used import statement happens in that context
* and NOT in the window (eg. popup or iframe) this module is instantiated for!
*
* @memberOf egw
* @param {string|array} _jsFiles (array of) urls to include
* @param {function} _callback called after JS files are loaded and executed
* @param {object} _context
* @param {string} _prefix prefix for _jsFiles
* @deprecated use es6 import statement: Promise.all([].concat(_jsFiles).map((src)=>import(_prefix+src))).then(...)
* @return Promise
*/
includeJS: function(_jsFiles, _callback, _context, _prefix)